lxc 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lxc/container.rb +1 -1
- data/lib/lxc/version.rb +1 -1
- data/spec/lxc/container_spec.rb +11 -3
- metadata +3 -3
data/lib/lxc/container.rb
CHANGED
@@ -12,7 +12,7 @@ class LXC
|
|
12
12
|
|
13
13
|
# An array containing the valid container states extracted from the LXC
|
14
14
|
# c-source code.
|
15
|
-
STATES = %w(stopped starting running stopping aborting freezing frozen thawed).map(&:to_sym)
|
15
|
+
STATES = %w(stopped starting running stopping aborting freezing frozen thawed not_created).map(&:to_sym)
|
16
16
|
|
17
17
|
# @!method stopped?
|
18
18
|
# Returns true if the container is stopped, false otherwise.
|
data/lib/lxc/version.rb
CHANGED
data/spec/lxc/container_spec.rb
CHANGED
@@ -29,11 +29,19 @@ describe LXC::Container do
|
|
29
29
|
LXC_VERSIONS.each do |lxc_version|
|
30
30
|
context "LXC Target Version #{lxc_version}" do
|
31
31
|
|
32
|
+
describe "#not_created?" do
|
33
|
+
it "should return true for an un-created container" do
|
34
|
+
subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
|
35
|
+
|
36
|
+
subject.not_created?.should == true
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
32
40
|
describe "#stopped?" do
|
33
41
|
it "should return true for an un-created container" do
|
34
42
|
subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
|
35
43
|
|
36
|
-
subject.stopped?.should ==
|
44
|
+
subject.stopped?.should == false
|
37
45
|
end
|
38
46
|
end
|
39
47
|
|
@@ -110,10 +118,10 @@ describe LXC::Container do
|
|
110
118
|
end
|
111
119
|
|
112
120
|
describe "#state" do
|
113
|
-
it "should return
|
121
|
+
it "should return not_created for an un-created container" do
|
114
122
|
subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
|
115
123
|
|
116
|
-
subject.state.should == :
|
124
|
+
subject.state.should == :not_created
|
117
125
|
end
|
118
126
|
end
|
119
127
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lxc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
182
|
version: '0'
|
183
183
|
segments:
|
184
184
|
- 0
|
185
|
-
hash:
|
185
|
+
hash: 2954289830468247715
|
186
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
187
|
none: false
|
188
188
|
requirements:
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
segments:
|
193
193
|
- 0
|
194
|
-
hash:
|
194
|
+
hash: 2954289830468247715
|
195
195
|
requirements: []
|
196
196
|
rubyforge_project:
|
197
197
|
rubygems_version: 1.8.25
|