mirror of
https://github.com/puppetlabs/vmpooler-provider-ec2.git
synced 2026-01-26 02:28:40 -05:00
fix spec tests
This commit is contained in:
parent
a09deaf1f3
commit
5f4a215621
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue