furnish-vagrant 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/Rakefile +2 -1
- data/furnish-vagrant.gemspec +3 -3
- data/lib/furnish/vagrant/version.rb +1 -1
- data/test/helper.rb +10 -0
- data/test/test_vagrant.rb +7 -17
- metadata +17 -10
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -45,7 +45,7 @@ is shut those machines down, and remove the machines (delete the disks too) to
|
|
45
45
|
get things back to a better state.
|
46
46
|
|
47
47
|
If you need to see vagrant's output to assist you while testing, run your tests
|
48
|
-
with `
|
48
|
+
with `FURNISH_DEBUG` set in your environment.
|
49
49
|
|
50
50
|
## Installation
|
51
51
|
|
data/Rakefile
CHANGED
@@ -10,7 +10,8 @@ end
|
|
10
10
|
|
11
11
|
RDoc::Task.new do |rdoc|
|
12
12
|
rdoc.title = "Furnish -> Vagrant 1.0.x bridge"
|
13
|
-
rdoc.
|
13
|
+
rdoc.main = "README.md"
|
14
|
+
rdoc.rdoc_files.include("README.md", "lib/**/*.rb")
|
14
15
|
rdoc.rdoc_files -= ["lib/furnish/vagrant/version.rb"]
|
15
16
|
if ENV["RDOC_COVER"]
|
16
17
|
rdoc.options << "-C"
|
data/furnish-vagrant.gemspec
CHANGED
@@ -18,14 +18,14 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
20
|
gem.add_dependency 'vagrant-prison', '~> 0.1.0'
|
21
|
-
gem.add_dependency 'furnish', '~> 0.0.
|
21
|
+
gem.add_dependency 'furnish', '~> 0.0.4'
|
22
22
|
|
23
|
-
gem.add_development_dependency 'furnish-ip', '~> 0.0.
|
23
|
+
gem.add_development_dependency 'furnish-ip', '~> 0.0.3'
|
24
24
|
gem.add_development_dependency 'rake'
|
25
25
|
gem.add_development_dependency 'minitest', '~> 4.5.0'
|
26
26
|
gem.add_development_dependency 'guard-minitest'
|
27
27
|
gem.add_development_dependency 'guard-rake'
|
28
|
-
gem.add_development_dependency 'rdoc'
|
28
|
+
gem.add_development_dependency 'rdoc', '~> 4'
|
29
29
|
gem.add_development_dependency 'rb-fsevent'
|
30
30
|
gem.add_development_dependency 'simplecov'
|
31
31
|
gem.add_development_dependency 'net-ssh'
|
data/test/helper.rb
CHANGED
@@ -7,6 +7,16 @@ if ENV["COVERAGE"]
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
+
unless ENV["FURNISH_DEBUG"]
|
11
|
+
$stderr.puts <<-EOF
|
12
|
+
|
13
|
+
These tests are *SLOW* and take some time to run with very little feedback.
|
14
|
+
If you want output of what is going on in the test suite, set FURNISH_DEBUG
|
15
|
+
in your environment.
|
16
|
+
|
17
|
+
EOF
|
18
|
+
end
|
19
|
+
|
10
20
|
require 'furnish/test'
|
11
21
|
require 'furnish/provisioners/auto_ip'
|
12
22
|
require 'furnish/provisioners/vagrant'
|
data/test/test_vagrant.rb
CHANGED
@@ -6,17 +6,13 @@ require 'stringio'
|
|
6
6
|
# which the monitor will catch and abort over.
|
7
7
|
#++
|
8
8
|
class TestVagrant < Furnish::TestCase
|
9
|
-
BOX_URL = "http://files.vagrantup.com/
|
9
|
+
BOX_URL = "http://files.vagrantup.com/precise64.box"
|
10
10
|
|
11
11
|
attr_reader :sched
|
12
12
|
|
13
13
|
def setup
|
14
14
|
super
|
15
15
|
|
16
|
-
if ENV["VAGRANT_DEBUG"]
|
17
|
-
Furnish.logger = Furnish::Logger.new($stdout, 3)
|
18
|
-
end
|
19
|
-
|
20
16
|
Furnish::Vagrant::UI.debug_level = 0
|
21
17
|
|
22
18
|
@sched = Furnish::Scheduler.new
|
@@ -26,12 +22,6 @@ class TestVagrant < Furnish::TestCase
|
|
26
22
|
|
27
23
|
def teardown
|
28
24
|
sched.teardown
|
29
|
-
|
30
|
-
if ENV["VAGRANT_DEBUG"]
|
31
|
-
# hack to get around the close cleanup in Furnish::TestCase
|
32
|
-
Furnish.logger = Furnish::Logger.new(StringIO.new("", "w"), 3)
|
33
|
-
end
|
34
|
-
|
35
25
|
super
|
36
26
|
end
|
37
27
|
|
@@ -64,8 +54,8 @@ class TestVagrant < Furnish::TestCase
|
|
64
54
|
def setup_ip
|
65
55
|
@ip = Furnish::IP.new("10.10.10.0/24")
|
66
56
|
# Allocate the first two addresses -- vagrant wants the subnet and the first IP.
|
67
|
-
@ip.
|
68
|
-
@ip.
|
57
|
+
@ip.allocate("10.10.10.0")
|
58
|
+
@ip.allocate("10.10.10.1")
|
69
59
|
end
|
70
60
|
|
71
61
|
def make_provisioner(num=1)
|
@@ -88,7 +78,7 @@ class TestVagrant < Furnish::TestCase
|
|
88
78
|
end
|
89
79
|
|
90
80
|
assert(Furnish::Provisioner::Vagrant.new(:box_url => BOX_URL))
|
91
|
-
assert(Furnish::Provisioner::Vagrant.new(:box => "
|
81
|
+
assert(Furnish::Provisioner::Vagrant.new(:box => "precise64"))
|
92
82
|
|
93
83
|
assert_raises(ArgumentError, "customizations must be an array of customizations, or array of array of multiple customizations.") do
|
94
84
|
Furnish::Provisioner::Vagrant.new(:box_url => BOX_URL, :customizations => 1)
|
@@ -192,7 +182,7 @@ class TestVagrant < Furnish::TestCase
|
|
192
182
|
|
193
183
|
mem_line = output.split(/\n/).grep(/^Mem/).first
|
194
184
|
usage = mem_line.split(/\s+/)[1]
|
195
|
-
assert_equal("
|
185
|
+
assert_equal("995", usage, "usage is higher with customizations")
|
196
186
|
end
|
197
187
|
|
198
188
|
def test_logger_interaction
|
@@ -209,7 +199,7 @@ class TestVagrant < Furnish::TestCase
|
|
209
199
|
log = io.string
|
210
200
|
|
211
201
|
assert_match(/\[test1-0\]/, log, "vagrant log is showing up")
|
212
|
-
assert_match(/Importing base box '
|
202
|
+
assert_match(/Importing base box 'precise64'/, log, "vagrant log is showing up")
|
213
203
|
|
214
204
|
io = StringIO.new("", "w")
|
215
205
|
Furnish.logger = Furnish::Logger.new(io, 0)
|
@@ -224,6 +214,6 @@ class TestVagrant < Furnish::TestCase
|
|
224
214
|
log = io.string
|
225
215
|
|
226
216
|
refute_match(/\[test2-0\]/, log, "vagrant log is showing up")
|
227
|
-
refute_match(/Importing base box '
|
217
|
+
refute_match(/Importing base box 'precise64'/, log, "vagrant log is showing up")
|
228
218
|
end
|
229
219
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: furnish-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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-03-
|
12
|
+
date: 2013-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: vagrant-prison
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.0.
|
37
|
+
version: 0.0.4
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.0.
|
45
|
+
version: 0.0.4
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: furnish-ip
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.0.
|
53
|
+
version: 0.0.3
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.0.
|
61
|
+
version: 0.0.3
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rake
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,17 +128,17 @@ dependencies:
|
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ~>
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: '
|
133
|
+
version: '4'
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
none: false
|
138
138
|
requirements:
|
139
|
-
- -
|
139
|
+
- - ~>
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: '
|
141
|
+
version: '4'
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: rb-fsevent
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,6 +195,7 @@ extensions: []
|
|
195
195
|
extra_rdoc_files: []
|
196
196
|
files:
|
197
197
|
- .gitignore
|
198
|
+
- CHANGELOG.md
|
198
199
|
- Gemfile
|
199
200
|
- Guardfile
|
200
201
|
- LICENSE.txt
|
@@ -218,12 +219,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
219
|
- - ! '>='
|
219
220
|
- !ruby/object:Gem::Version
|
220
221
|
version: '0'
|
222
|
+
segments:
|
223
|
+
- 0
|
224
|
+
hash: -1554732946598579537
|
221
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
226
|
none: false
|
223
227
|
requirements:
|
224
228
|
- - ! '>='
|
225
229
|
- !ruby/object:Gem::Version
|
226
230
|
version: '0'
|
231
|
+
segments:
|
232
|
+
- 0
|
233
|
+
hash: -1554732946598579537
|
227
234
|
requirements: []
|
228
235
|
rubyforge_project:
|
229
236
|
rubygems_version: 1.8.25
|