beaker-vagrant 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/beaker-vagrant/version.rb +1 -1
- data/lib/beaker/hypervisor/vagrant.rb +6 -2
- data/spec/beaker/hypervisor/vagrant_spec.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74c1cb569c6a0c707030b00ca1a05d16642a0c53
|
4
|
+
data.tar.gz: 91b7008f99327d8e84d668a289430b52b9c4e642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d9fa34cb3d014bb41bfe680a76a7814d9bf163573e3d86fa5cdab6b3bb32c6743d2357fda231ca157c74f196fe15dfe653d8ebf054e2d6a79c32adcae0838e0
|
7
|
+
data.tar.gz: e64456d0bc01007038eadb0eaa94355818b8f6da4d58ac45373f9be98e22e14183bd01a75ba4888dad6345161d995c82eea9bc110dbf8f003d5fba90d9274bec
|
@@ -23,11 +23,14 @@ module Beaker
|
|
23
23
|
private_network_string = " v.vm.network :private_network, ip: \"#{host['ip'].to_s}\", :netmask => \"#{host['netmask'] ||= "255.255.0.0"}\""
|
24
24
|
case host['network_mac']
|
25
25
|
when 'false'
|
26
|
+
@mac = randmac
|
26
27
|
private_network_string << "\n"
|
27
28
|
when nil
|
28
|
-
|
29
|
+
@mac = randmac
|
30
|
+
private_network_string << ", :mac => \"#{@mac}\"\n"
|
29
31
|
else
|
30
|
-
|
32
|
+
@mac = host['network_mac']
|
33
|
+
private_network_string << ", :mac => \"#{@mac}\"\n"
|
31
34
|
end
|
32
35
|
end
|
33
36
|
|
@@ -103,6 +106,7 @@ module Beaker
|
|
103
106
|
else
|
104
107
|
v_file << " v.vm.synced_folder '.', '/vagrant', :nfs => true\n"
|
105
108
|
end
|
109
|
+
v_file << " v.vm.base_mac = '#{@mac}'\n"
|
106
110
|
end
|
107
111
|
|
108
112
|
v_file << self.class.provider_vfile_section(host, options)
|
@@ -187,6 +187,30 @@ EOF
|
|
187
187
|
end
|
188
188
|
end
|
189
189
|
|
190
|
+
context 'when generating a freebsd config' do
|
191
|
+
before do
|
192
|
+
path = vagrant.instance_variable_get( :@vagrant_path )
|
193
|
+
allow( vagrant ).to receive( :randmac ).and_return( "0123456789" )
|
194
|
+
@hosts[0][:platform] = 'freebsd'
|
195
|
+
|
196
|
+
vagrant.make_vfile( @hosts )
|
197
|
+
|
198
|
+
@generated_file = File.read( File.expand_path( File.join( path, "Vagrantfile") ) )
|
199
|
+
end
|
200
|
+
|
201
|
+
it 'has the proper ssh shell' do
|
202
|
+
expect( @generated_file ).to match /v.ssh.shell = 'sh'\n/
|
203
|
+
end
|
204
|
+
|
205
|
+
it 'has the proper guest setting' do
|
206
|
+
expect( @generated_file ).to match /v.vm.guest = :freebsd\n/
|
207
|
+
end
|
208
|
+
|
209
|
+
it 'sets the vm.base_mac setting' do
|
210
|
+
expect( @generated_file ).to match /v.vm.base_mac = '0123456789'\n/
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
190
214
|
it "uses the memsize defined per vagrant host" do
|
191
215
|
path = vagrant.instance_variable_get( :@vagrant_path )
|
192
216
|
allow( vagrant ).to receive( :randmac ).and_return( "0123456789" )
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rishi Javia, Kevin Imber, Tony Vu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|