testlab 1.3.1 → 1.3.2

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.
data/.travis.yml CHANGED
@@ -10,4 +10,6 @@ rvm:
10
10
  before_install: sudo ./spec/support/install-lxc.sh
11
11
 
12
12
  notifications:
13
+ email:
14
+ - testlab-ci@lookout.com
13
15
  irc: "irc.freenode.net#jovelabs"
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/testlab.png)](http://badge.fury.io/rb/testlab)
2
2
  [![Dependency Status](https://gemnasium.com/zpatten/testlab.png)](https://gemnasium.com/zpatten/testlab)
3
- [![Build Status](https://secure.travis-ci.org/zpatten/testlab.png)](http://travis-ci.org/zpatten/testlab)
3
+ [![Build Status](https://secure.travis-ci.org/lookout/testlab.png)](http://travis-ci.org/lookout/testlab)
4
4
  [![Coverage Status](https://coveralls.io/repos/zpatten/testlab/badge.png?branch=master)](https://coveralls.io/r/zpatten/testlab)
5
5
  [![Code Climate](https://codeclimate.com/github/zpatten/testlab.png)](https://codeclimate.com/github/zpatten/testlab)
6
6
 
@@ -132,10 +132,10 @@ class TestLab
132
132
 
133
133
 
134
134
  def initialize(*args)
135
- @ui = TestLab.ui
135
+ @ui = TestLab.ui
136
136
 
137
+ @ui.logger.info { "Loading Container '#{self.id}'" }
137
138
  super(*args)
138
-
139
139
  @ui.logger.info { "Container '#{self.id}' Loaded" }
140
140
  end
141
141
 
@@ -21,8 +21,8 @@ class TestLab
21
21
  def initialize(*args)
22
22
  @ui = TestLab.ui
23
23
 
24
+ @ui.logger.info { "Loading Interface '#{self.id}'" }
24
25
  super(*args)
25
-
26
26
  @ui.logger.info { "Interface '#{self.id}' Loaded" }
27
27
  end
28
28
 
@@ -11,6 +11,15 @@ class TestLab
11
11
 
12
12
  attribute :testlab
13
13
  attribute :config, :default => Hash.new
14
+ attribute :version, :default => TestLab::VERSION
15
+
16
+ def initialize(*args)
17
+ @ui = TestLab.ui
18
+
19
+ @ui.logger.info { "Loading Labfile '#{self.id}'" }
20
+ super(*args)
21
+ @ui.logger.info { "Labfile '#{self.id}' Loaded" }
22
+ end
14
23
 
15
24
  def config_dir
16
25
  self.testlab.config_dir
@@ -39,10 +39,10 @@ class TestLab
39
39
 
40
40
 
41
41
  def initialize(*args)
42
- @ui = TestLab.ui
42
+ @ui = TestLab.ui
43
43
 
44
+ @ui.logger.info { "Loading Network '#{self.id}'" }
44
45
  super(*args)
45
-
46
46
  @ui.logger.info { "Network '#{self.id}' Loaded" }
47
47
  end
48
48
 
data/lib/testlab/node.rb CHANGED
@@ -44,7 +44,9 @@ class TestLab
44
44
 
45
45
 
46
46
  def initialize(*args)
47
- @ui = TestLab.ui
47
+ @ui = TestLab.ui
48
+
49
+ @ui.logger.info { "Loading Node '#{self.id}'" }
48
50
 
49
51
  super(*args)
50
52
 
data/lib/testlab/user.rb CHANGED
@@ -30,8 +30,8 @@ class TestLab
30
30
  def initialize(*args)
31
31
  @ui = TestLab.ui
32
32
 
33
+ @ui.logger.info { "Loading User '#{self.id}'" }
33
34
  super(*args)
34
-
35
35
  @ui.logger.info { "User '#{self.id}' Loaded" }
36
36
  end
37
37
 
@@ -1,6 +1,6 @@
1
1
  class TestLab
2
2
  unless const_defined?(:VERSION)
3
3
  # TestLab Gem Version
4
- VERSION = "1.3.1"
4
+ VERSION = "1.3.2"
5
5
  end
6
6
  end
@@ -153,6 +153,7 @@ describe TestLab::Container do
153
153
  subject.lxc.stub(:state) { :not_created }
154
154
  subject.lxc_clone.stub(:exists?) { false }
155
155
  subject.node.ssh.stub(:exec)
156
+ subject.stub(:provisioners) { Array.new }
156
157
 
157
158
  subject.create
158
159
  end
@@ -165,6 +166,7 @@ describe TestLab::Container do
165
166
  subject.lxc.stub(:state) { :stopped }
166
167
  subject.lxc.stub(:destroy) { true }
167
168
  subject.lxc_clone.stub(:exists?) { false }
169
+ subject.stub(:provisioners) { Array.new }
168
170
 
169
171
  subject.destroy
170
172
  end
@@ -178,9 +180,12 @@ describe TestLab::Container do
178
180
  subject.lxc.stub(:wait) { true }
179
181
  subject.lxc.stub(:state) { :running }
180
182
  subject.lxc.stub(:attach)
183
+ subject.stub(:provisioners) { Array.new }
181
184
 
182
185
  subject.lxc_clone.stub(:exists?) { false }
183
186
 
187
+ ZTK::TCPSocketCheck.any_instance.stub(:wait) { true }
188
+
184
189
  subject.up
185
190
  end
186
191
  end
@@ -192,6 +197,8 @@ describe TestLab::Container do
192
197
  subject.lxc.stub(:stop) { true }
193
198
  subject.lxc.stub(:wait) { true }
194
199
  subject.lxc.stub(:state) { :stopped }
200
+ subject.stub(:provisioners) { Array.new }
201
+
195
202
  subject.down
196
203
  end
197
204
  end
data/spec/network_spec.rb CHANGED
@@ -112,6 +112,8 @@ describe TestLab::Network do
112
112
  subject.node.stub(:state) { :running }
113
113
  subject.stub(:state) { :not_created }
114
114
  subject.node.ssh.stub(:bootstrap) { true }
115
+ subject.stub(:provisioners) { Array.new }
116
+
115
117
  subject.create
116
118
  end
117
119
  end
@@ -121,6 +123,8 @@ describe TestLab::Network do
121
123
  subject.node.stub(:state) { :running }
122
124
  subject.stub(:state) { :stopped }
123
125
  subject.node.ssh.stub(:bootstrap) { true }
126
+ subject.stub(:provisioners) { Array.new }
127
+
124
128
  subject.destroy
125
129
  end
126
130
  end
@@ -130,6 +134,8 @@ describe TestLab::Network do
130
134
  subject.node.stub(:state) { :running }
131
135
  subject.stub(:state) { :stopped }
132
136
  subject.node.ssh.stub(:bootstrap) { true }
137
+ subject.stub(:provisioners) { Array.new }
138
+
133
139
  subject.up
134
140
  end
135
141
  end
@@ -139,6 +145,8 @@ describe TestLab::Network do
139
145
  subject.node.stub(:state) { :running }
140
146
  subject.stub(:state) { :running }
141
147
  subject.node.ssh.stub(:bootstrap) { true }
148
+ subject.stub(:provisioners) { Array.new }
149
+
142
150
  subject.down
143
151
  end
144
152
  end
data/spec/node_spec.rb CHANGED
@@ -71,6 +71,8 @@ describe TestLab::Node do
71
71
  it "should create the node" do
72
72
  subject.instance_variable_get(:@provider).stub(:create) { true }
73
73
  subject.stub(:state) { :not_created }
74
+ subject.stub(:provisioners) { Array.new }
75
+
74
76
  subject.create
75
77
  end
76
78
  end
@@ -79,6 +81,8 @@ describe TestLab::Node do
79
81
  it "should destroy the node" do
80
82
  subject.instance_variable_get(:@provider).stub(:destroy) { true }
81
83
  subject.stub(:state) { :stopped }
84
+ subject.stub(:provisioners) { Array.new }
85
+
82
86
  subject.destroy
83
87
  end
84
88
  end
@@ -87,6 +91,8 @@ describe TestLab::Node do
87
91
  it "should online the node" do
88
92
  subject.instance_variable_get(:@provider).stub(:up) { true }
89
93
  subject.stub(:state) { :stopped }
94
+ subject.stub(:provisioners) { Array.new }
95
+
90
96
  subject.up
91
97
  end
92
98
  end
@@ -95,6 +101,8 @@ describe TestLab::Node do
95
101
  it "should offline the node" do
96
102
  subject.instance_variable_get(:@provider).stub(:down) { true }
97
103
  subject.stub(:state) { :running }
104
+ subject.stub(:provisioners) { Array.new }
105
+
98
106
  subject.down
99
107
  end
100
108
  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: 1.3.1
4
+ version: 1.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-31 00:00:00.000000000 Z
12
+ date: 2013-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gli
@@ -338,7 +338,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
338
338
  version: '0'
339
339
  segments:
340
340
  - 0
341
- hash: -587948980101770715
341
+ hash: 3530419206438769386
342
342
  required_rubygems_version: !ruby/object:Gem::Requirement
343
343
  none: false
344
344
  requirements:
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
347
  version: '0'
348
348
  segments:
349
349
  - 0
350
- hash: -587948980101770715
350
+ hash: 3530419206438769386
351
351
  requirements: []
352
352
  rubyforge_project:
353
353
  rubygems_version: 1.8.25