rmi docker provider tests: May also be in use by a stopped container
This commit is contained in:
parent
d372ba0b5d
commit
b566b0ee13
@ -389,7 +389,7 @@ describe VagrantPlugins::DockerProvider::Driver do
|
||||
end
|
||||
end
|
||||
|
||||
context 'image is being used' do
|
||||
context 'image is being used by running container' do
|
||||
before { allow(subject).to receive(:execute).and_raise("image is being used by running container") }
|
||||
|
||||
it 'does not remove the image' do
|
||||
@ -398,6 +398,15 @@ describe VagrantPlugins::DockerProvider::Driver do
|
||||
end
|
||||
end
|
||||
|
||||
context 'image is being used by stopped container' do
|
||||
before { allow(subject).to receive(:execute).and_raise("image is being used by stopped container") }
|
||||
|
||||
it 'does not remove the image' do
|
||||
expect(subject.rmi(id)).to eq(false)
|
||||
subject.rmi(id)
|
||||
end
|
||||
end
|
||||
|
||||
context 'container is using it' do
|
||||
before { allow(subject).to receive(:execute).and_raise("container is using it") }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user