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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 442e5662e70ec7b271fe5bc069c9b21f302db394
4
- data.tar.gz: 4ea668eb97e1fb2cea88cff369b01cff7b490973
3
+ metadata.gz: 74c1cb569c6a0c707030b00ca1a05d16642a0c53
4
+ data.tar.gz: 91b7008f99327d8e84d668a289430b52b9c4e642
5
5
  SHA512:
6
- metadata.gz: 0d213b0730388cadf6e92389468f3b5613aa7562b4a484865339f410e695b7085852c2640858667954ba40cb781407c6d28606131eff2b6dbd55c160e9e2aa97
7
- data.tar.gz: 8d98786ed2aae6b82002567fab605e1ceb9ad28cff7dcbde1b9c0c59c6b1a95b67f30c5ff5e6669115218b6b4e0cc425e759708af98c21366bcbb56889ae5a9b
6
+ metadata.gz: 6d9fa34cb3d014bb41bfe680a76a7814d9bf163573e3d86fa5cdab6b3bb32c6743d2357fda231ca157c74f196fe15dfe653d8ebf054e2d6a79c32adcae0838e0
7
+ data.tar.gz: e64456d0bc01007038eadb0eaa94355818b8f6da4d58ac45373f9be98e22e14183bd01a75ba4888dad6345161d995c82eea9bc110dbf8f003d5fba90d9274bec
@@ -1,3 +1,3 @@
1
1
  module BeakerVagrant
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -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
- private_network_string << ", :mac => \"#{randmac}\"\n"
29
+ @mac = randmac
30
+ private_network_string << ", :mac => \"#{@mac}\"\n"
29
31
  else
30
- private_network_string << ", :mac => \"#{host['network_mac']}\"\n"
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.3.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-16 00:00:00.000000000 Z
11
+ date: 2018-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec