mirror of
https://github.com/inspec/inspec
synced 2024-09-21 06:51:56 +00:00
Renamed resources for readability
Closes #27 Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
This commit is contained in:
parent
79c51a3b94
commit
a4e0df698a
4 changed files with 5 additions and 5 deletions
|
@ -7,7 +7,7 @@ require 'azure_backend'
|
|||
#
|
||||
# @attr_reader [Azure::ARM::Compute::Models::VirtualMachine] vm VM object as retrieved from Azure
|
||||
class AzureVm < Inspec.resource(1)
|
||||
name 'azure_vm'
|
||||
name 'azure_virtual_machine'
|
||||
|
||||
desc "
|
||||
This resource gathers information about which image the vm was created from
|
|
@ -8,7 +8,7 @@ require 'uri'
|
|||
#
|
||||
# @attr_reader [Array<Hash>] params Array of hashes containing information about all the data disks attached to the machine
|
||||
class AzureVmDataDisks < Inspec.resource(1)
|
||||
name 'azure_vm_datadisks'
|
||||
name 'azure_virtual_machine_datadisks'
|
||||
|
||||
desc "
|
||||
This resource gather information about the data disks attached to a virtual machine
|
|
@ -11,13 +11,13 @@ control 'azure-vm-datadisks-1.0' do
|
|||
resource_group_name = 'Inspec-Azure'
|
||||
|
||||
# Ensure that the named machine has 1 data disk
|
||||
describe azure_vm_datadisks(host: vm_internal, resource_group: resource_group_name) do
|
||||
describe azure_virtual_machine_datadisks(host: vm_internal, resource_group: resource_group_name) do
|
||||
its('has_disks?') { should be true }
|
||||
its('count') { should eq 1 }
|
||||
end
|
||||
|
||||
# Ensure that the first data disk on the same machine size is greater than 10gb
|
||||
describe azure_vm_datadisks(host: vm_internal, resource_group: resource_group_name).where { disk.zero? and size > 10 } do
|
||||
describe azure_virtual_machine_datadisks(host: vm_internal, resource_group: resource_group_name).where { disk.zero? and size > 10 } do
|
||||
its('entries') { should_not be_empty }
|
||||
end
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ control 'azure-vm-1.0' do
|
|||
title 'Ensure VM was built with the correct Image and has the correct properties'
|
||||
|
||||
# Ensure that the virtual machine has been created with the correct attributes
|
||||
describe azure_vm(host: 'Linux-Internal-VM', resource_group: 'Inspec-Azure') do
|
||||
describe azure_virtual_machine(host: 'Linux-Internal-VM', resource_group: 'Inspec-Azure') do
|
||||
its('sku') { should eq '16.04.0-LTS' }
|
||||
its('publisher') { should eq 'Canonical' }
|
||||
its('offer') { should eq 'UbuntuServer' }
|
||||
|
|
Loading…
Reference in a new issue