spec/container_spec.rb in testlab-1.3.1 vs spec/container_spec.rb in testlab-1.3.2
- old
+ new
@@ -151,10 +151,11 @@
subject.stub(:detect_arch) { "amd64" }
subject.lxc.stub(:create) { true }
subject.lxc.stub(:state) { :not_created }
subject.lxc_clone.stub(:exists?) { false }
subject.node.ssh.stub(:exec)
+ subject.stub(:provisioners) { Array.new }
subject.create
end
end
@@ -163,10 +164,11 @@
subject.node.stub(:state) { :running }
subject.lxc.stub(:exists?) { true }
subject.lxc.stub(:state) { :stopped }
subject.lxc.stub(:destroy) { true }
subject.lxc_clone.stub(:exists?) { false }
+ subject.stub(:provisioners) { Array.new }
subject.destroy
end
end
@@ -176,13 +178,16 @@
subject.lxc.stub(:exists?) { true }
subject.lxc.stub(:start) { true }
subject.lxc.stub(:wait) { true }
subject.lxc.stub(:state) { :running }
subject.lxc.stub(:attach)
+ subject.stub(:provisioners) { Array.new }
subject.lxc_clone.stub(:exists?) { false }
+ ZTK::TCPSocketCheck.any_instance.stub(:wait) { true }
+
subject.up
end
end
describe "#down" do
@@ -190,9 +195,11 @@
subject.node.stub(:state) { :running }
subject.lxc.stub(:exists?) { true }
subject.lxc.stub(:stop) { true }
subject.lxc.stub(:wait) { true }
subject.lxc.stub(:state) { :stopped }
+ subject.stub(:provisioners) { Array.new }
+
subject.down
end
end
describe "#provision" do