beaker-vagrant 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/beaker-vagrant/version.rb +1 -1
- data/lib/beaker/hypervisor/vagrant.rb +1 -0
- data/spec/beaker/hypervisor/vagrant_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2U0MmM2YjliMGU4NDMyM2Y1YjJhYjI0YjQxN2RiMjA2MjUzZWVhYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmZmNWM2NzczNWIwMzk5NmFmMWFmZjFiYWFiODkyNmQyOTNkMzRmNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmJhZWE4OTljNmQ1YTExMmRhZDI2M2YyNWFkMDliYjUxZGQyOGFjMWZjMjli
|
10
|
+
ZDhmN2JmYmJjMmU2NDBmZjNkZGY1ZjhhZWU0Zjc3NTU2MWZlMDFlMTJkNTI4
|
11
|
+
MGM3OTBlODdhYWU3OWIyMjA1Y2NlODEyYjVhMDA1NjliMTU4Yzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGQxMDAxZmY2NDVlNDMyZTFjNThiMjU0MmFhYTQ4YTBjZjgxMDIyYjFjMTFh
|
14
|
+
YjkwMWFjZWU2MWUwNjA0ODJhYTU3OGNjYTg1YmExNmIwMDBmYTFkMzM4NTlm
|
15
|
+
MzA2MzVlMTVkOTVkZTExYWQxNTZkZmIzNWUyMGQ2MGE2YWRmMGM=
|
@@ -39,6 +39,7 @@ module Beaker
|
|
39
39
|
v_file << " c.ssh.insert_key = false\n"
|
40
40
|
|
41
41
|
hosts.each do |host|
|
42
|
+
host.name.tr!('_','-') # Rewrite Hostname with hyphens instead of underscores to get legal hostname
|
42
43
|
host['ip'] ||= randip #use the existing ip, otherwise default to a random ip
|
43
44
|
v_file << " c.vm.define '#{host.name}' do |v|\n"
|
44
45
|
v_file << " v.vm.hostname = '#{host.name}'\n"
|
@@ -106,6 +106,18 @@ EOF
|
|
106
106
|
expect( vagrantfile ).to match(/(ssh.forward_agent = true)/)
|
107
107
|
end
|
108
108
|
|
109
|
+
it "can replace underscores in host.name with hypens" do
|
110
|
+
path = vagrant.instance_variable_get( :@vagrant_path )
|
111
|
+
allow( vagrant ).to receive( :randmac ).and_return( "0123456789" )
|
112
|
+
|
113
|
+
host = make_host( 'name-with_underscore', {} )
|
114
|
+
vagrant.make_vfile( [host,], options )
|
115
|
+
|
116
|
+
vagrantfile = File.read( File.expand_path( File.join( path, "Vagrantfile")))
|
117
|
+
expect( vagrantfile ).to match(/v.vm.hostname = .*name-with-underscore/)
|
118
|
+
|
119
|
+
end
|
120
|
+
|
109
121
|
it "can make a Vagrantfile with synced_folder disabled" do
|
110
122
|
path = vagrant.instance_variable_get( :@vagrant_path )
|
111
123
|
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.2.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:
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|