Incorporated review comments to add rspec test to check unique os disk name should generate on server create

This commit is contained in:
siddheshwar-more 2013-07-17 12:43:45 +05:30 коммит произвёл adamedx
Родитель 52e9fe1d32
Коммит ef24d437bc
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -115,6 +115,21 @@ describe "parameter test:" do
Chef::Config[:knife][:azure_dns_name]) Chef::Config[:knife][:azure_dns_name])
end end
it "generate unique OS DiskName" do
os_disks = []
@bootstrap.stub(:run)
Chef::Config[:knife][:azure_dns_name] = 'vmname'
5.times do
@server_instance.config[:azure_mgmt_cert] = "AzureLinuxCert.pem"
@server_instance.run
testxml = Nokogiri::XML(@receivedXML)
disklink = xml_content(testxml, 'MediaLink')
os_disks.should_not include(disklink)
os_disks.push(disklink)
end
end
it "advanced create" do it "advanced create" do
# set all params # set all params
Chef::Config[:knife][:azure_dns_name] = 'service001' Chef::Config[:knife][:azure_dns_name] = 'service001'