testlab 0.6.16 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,7 +84,7 @@ class TestLab
|
|
84
84
|
|
85
85
|
def chef_client_rb(container)
|
86
86
|
<<-EOF
|
87
|
-
#{ZTK::Template.do_not_edit_notice(:message => "
|
87
|
+
#{ZTK::Template.do_not_edit_notice(:message => "OmniBus TestLab Chef-Client Configuration")}
|
88
88
|
log_level #{@config[:chef][:client][:log_level].inspect}
|
89
89
|
log_location STDOUT
|
90
90
|
chef_server_url #{@config[:chef][:client][:server_url].inspect}
|
@@ -12,8 +12,8 @@ class TestLab
|
|
12
12
|
require 'tempfile'
|
13
13
|
|
14
14
|
def initialize(config={}, ui=nil)
|
15
|
+
@ui = (ui || TestLab.ui)
|
15
16
|
@config = (config || Hash.new)
|
16
|
-
@ui = (ui || TestLab.ui)
|
17
17
|
end
|
18
18
|
|
19
19
|
# Shell Provisioner Container Setup
|
@@ -25,9 +25,9 @@ class TestLab
|
|
25
25
|
# provision.
|
26
26
|
# @return [Boolean] True if successful.
|
27
27
|
def on_container_setup(container)
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
@config[:script].nil? and raise ShellError, "You must supply a script to bootstrap!"
|
29
|
+
|
30
|
+
container.bootstrap(@config[:script])
|
31
31
|
|
32
32
|
true
|
33
33
|
end
|
data/lib/testlab/version.rb
CHANGED
@@ -42,7 +42,7 @@ describe TestLab::Provisioner::Shell do
|
|
42
42
|
it "should provision the container" do
|
43
43
|
subject.node.ssh.stub(:file).and_yield(StringIO.new)
|
44
44
|
subject.stub(:fs_root) { "/var/lib/lxc/#{subject.id}/rootfs" }
|
45
|
-
subject.lxc.stub(:
|
45
|
+
subject.lxc.stub(:bootstrap) { "" }
|
46
46
|
|
47
47
|
p = TestLab::Provisioner::Shell.new(subject.config, @ui)
|
48
48
|
p.on_container_setup(subject)
|
@@ -53,12 +53,10 @@ describe TestLab::Provisioner::Shell do
|
|
53
53
|
it "should raise an exception" do
|
54
54
|
subject.node.ssh.stub(:file).and_yield(StringIO.new)
|
55
55
|
subject.stub(:fs_root) { "/var/lib/lxc/#{subject.id}/rootfs" }
|
56
|
-
subject.lxc.stub(:
|
57
|
-
"#{arg2}: No such file or directory"
|
58
|
-
end
|
56
|
+
subject.lxc.stub(:bootstrap) { "" }
|
59
57
|
|
60
|
-
p = TestLab::Provisioner::Shell.new(
|
61
|
-
lambda{ p.on_container_setup(subject) }.should raise_error TestLab::
|
58
|
+
p = TestLab::Provisioner::Shell.new(Hash.new, @ui)
|
59
|
+
lambda{ p.on_container_setup(subject) }.should raise_error TestLab::Provisioner::ShellError
|
62
60
|
end
|
63
61
|
end
|
64
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testlab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -303,7 +303,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
303
303
|
version: '0'
|
304
304
|
segments:
|
305
305
|
- 0
|
306
|
-
hash: -
|
306
|
+
hash: -2300226116598449906
|
307
307
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
308
308
|
none: false
|
309
309
|
requirements:
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
312
|
version: '0'
|
313
313
|
segments:
|
314
314
|
- 0
|
315
|
-
hash: -
|
315
|
+
hash: -2300226116598449906
|
316
316
|
requirements: []
|
317
317
|
rubyforge_project:
|
318
318
|
rubygems_version: 1.8.25
|