Skip to content

Commit

Permalink
Merge pull request #711 from inspec/RESOURCE-585-create-the-integrati…
Browse files Browse the repository at this point in the history
…on-test-for-azure-graph-generic-resource-azure-lock-and-azure-key-vault-rotation-key-resources

Resource 585 create the integration test for azure graph generic resource and azure lock resources
  • Loading branch information
soumyo13 authored Feb 2, 2023
2 parents 42e2467 + 2943b85 commit a14e6e8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 37 deletions.
37 changes: 0 additions & 37 deletions libraries/azure_key_vault_rotation_key.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
control "azure_graph_generic_resources" do
title "Testing the plural resource of azure_graph_generic_resources."
desc "Testing the plural resource of azure_graph_generic_resources."

describe azure_graph_generic_resources(resource: "users", filter: { given_name: "John" }) do
it { should exist }
end
end
15 changes: 15 additions & 0 deletions test/integration/verify/controls/azure_lock.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource_group = input("resource_group", value: nil)
resource_name = input("windows_vm_name", value: nil)

control "azure_lock_test" do
title "Testing the singular resource of azure_lock."
desc "Testing the singular resource of azure_lock."

vm_id = azure_virtual_machine(resource_group: resource_group, name: resource_name).id

describe azure_locks(resource_id: vm_id).ids.each do |lock_id|
describe azure_lock(resource_id: lock_id) do
it("properties.notes") { should_not be_empty }
end
end
end

0 comments on commit a14e6e8

Please sign in to comment.