fix spec tests

This commit is contained in:
Samuel Beaulieu 2022-07-27 14:34:16 -05:00
parent a09deaf1f3
commit 5f4a215621
No known key found for this signature in database
GPG key ID: 12030F74136D0F34

View file

@ -159,7 +159,10 @@ EOT
context 'when VM exists but is missing information' do context 'when VM exists but is missing information' do
before(:each) do before(:each) do
tags = [MockTag.new(key: "vm_name", value: vmname)] tags = [
MockTag.new(key: "name", value: vmname),
MockTag.new(key: "vm_name", value: vmname)
]
allow(connection).to receive(:instances).and_return([MockInstance.new(tags: tags)]) allow(connection).to receive(:instances).and_return([MockInstance.new(tags: tags)])
end end
@ -194,7 +197,7 @@ EOT
instance_type: "a1.large", instance_type: "a1.large",
private_ip_address: "1.1.1.1", private_ip_address: "1.1.1.1",
tags: [ tags: [
MockTag.new(key: "vm_name", value: vmname), MockTag.new(key: "name", value: vmname),
MockTag.new(key: "pool", value: poolname) MockTag.new(key: "pool", value: poolname)
] ]
) )
@ -328,6 +331,8 @@ EOT
allow(connection).to receive(:client).and_return(client) allow(connection).to receive(:client).and_return(client)
allow(client).to receive(:wait_until) allow(client).to receive(:wait_until)
allow(instance).to receive(:id) allow(instance).to receive(:id)
allow(subject).to receive(:get_vm).and_return({})
allow(subject).to receive(:dns_teardown).and_return(true)
end end
it 'should return true' do it 'should return true' do