2017-02-13 13:53:07 +00:00
|
|
|
|
|
|
|
title 'Sample profile to test the data disks of a vm'
|
|
|
|
|
|
|
|
control 'azure-vm-datadisks-1.0' do
|
|
|
|
impact 1.0
|
2017-02-17 17:06:15 +00:00
|
|
|
title 'Ensure that the machine has 1 data disk'
|
2017-02-13 13:53:07 +00:00
|
|
|
|
2017-02-17 17:06:15 +00:00
|
|
|
hostname = ENV['AZURE_VM_NAME']
|
|
|
|
resource_group_name = ENV['AZURE_RESOURCE_GROUP_NAME']
|
|
|
|
|
|
|
|
describe azure_vm_datadisks(host: hostname, resource_group: resource_group_name) do
|
|
|
|
its('has_disks?') { should be true }
|
|
|
|
its('count') { should eq 1 }
|
|
|
|
end
|
|
|
|
|
2017-02-17 17:25:30 +00:00
|
|
|
describe azure_vm_datadisks(host: hostname, resource_group: resource_group_name).where { disk.zero? and size > 10 } do
|
2017-02-13 13:53:07 +00:00
|
|
|
its('entries') { should_not be_empty }
|
|
|
|
end
|
|
|
|
end
|