spec/node_spec.rb in testlab-0.5.4 vs spec/node_spec.rb in testlab-0.6.0
- old
+ new
@@ -41,26 +41,10 @@
it "should return the path to the node template directory" do
subject.class.template_dir.should == "#{TestLab.gem_dir}/lib/testlab/node/templates"
end
end
- describe "#bind_setup" do
- it "should setup bind" do
- subject.ssh.stub(:exec) { true }
- subject.ssh.stub(:file).and_yield(StringIO.new)
- subject.bind_setup
- end
- end
-
- describe "#build_resolv_conf" do
- it "should build resolv.conf" do
- subject.ssh.stub(:exec) { true }
- subject.ssh.stub(:file).and_yield(StringIO.new)
- subject.build_resolv_conf
- end
- end
-
describe "#status" do
it "should return a hash of status information about the node" do
subject.instance_variable_get(:@provider).stub(:state) { :not_created }
subject.status.should be_kind_of(Hash)
subject.status.should_not be_empty
@@ -110,15 +94,14 @@
end
end
describe "setup" do
it "should setup the node" do
+ subject.provisioners = Array.new
+ subject.containers.each { |c| c.provisioners = Array.new }
subject.ssh.stub(:bootstrap) { true }
subject.stub(:route_setup) { true }
- subject.stub(:build_resolv_conf) { true }
- subject.stub(:bind_setup) { true }
- subject.stub(:bind_reload) { true }
subject.stub(:create) { true }
subject.stub(:up) { true }
subject.containers.each do |container|
container.stub(:setup) { true }
end
@@ -129,9 +112,11 @@
end
end
describe "teardown" do
it "should teardown the node" do
+ subject.provisioners = Array.new
+ subject.containers.each { |c| c.provisioners = Array.new }
subject.stub(:route_setup) { true }
subject.stub(:down) { true }
subject.stub(:destroy) { true }
subject.containers.each do |container|
container.stub(:teardown) { true }