vagrant-parallels 1.3.8 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CONTRIBUTING.md +19 -0
- data/Gemfile +1 -0
- data/Vagrantfile +87 -0
- data/lib/vagrant-parallels/cap/nic_mac_addresses.rb +5 -2
- data/lib/vagrant-parallels/driver/base.rb +1 -1
- data/lib/vagrant-parallels/version.rb +1 -1
- data/tasks/acceptance.rake +26 -0
- data/test/acceptance/base.rb +2 -0
- data/test/acceptance/provider/synced_folder_spec.rb +26 -0
- data/test/acceptance/shared/context_parallels.rb +2 -0
- data/test/acceptance/skeletons/synced_folder/Vagrantfile +3 -0
- data/test/acceptance/skeletons/synced_folder/foo +1 -0
- data/vagrant-spec.config.example.rb +11 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79ec0b63ce9c8f248c00b5603f5ed393816f45f4
|
4
|
+
data.tar.gz: 1055f46d3991c28283c3ba94ab00710f9968047b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79764a185c87dbd793405ade66a90a87c51ea6003d8f738236a1dc2e8f3cb986e4272f3163afff1f1f6f5b3f958668cda510a0dd56e693a336866c3c7db20678
|
7
|
+
data.tar.gz: 6b143b31501c8e52b388d588d2ca60eac78b715992cb48c590d3abc0dde2a42922ce81d0a18dd31af5655bd3378ad6c9e9dd64a64acfb0b737124ae2bd400a8b
|
data/.gitignore
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -59,3 +59,22 @@ remote my-fork <fork_url>`)
|
|
59
59
|
4. Push the branch to your fork (`git push fork my-new-feature`)
|
60
60
|
5. Create a pull request from your `my-new-feature` branch into `master` of
|
61
61
|
`vagrant-parallels` repo
|
62
|
+
|
63
|
+
### Acceptance Tests
|
64
|
+
|
65
|
+
Vagrant also comes with an acceptance test suite that does black-box
|
66
|
+
tests of various Vagrant components. Note that these tests are **extremely
|
67
|
+
slow** because actual VMs are spun up and down. The full test suite can
|
68
|
+
take hours.
|
69
|
+
|
70
|
+
To run the acceptance test suite, first copy `vagrant-spec.config.example.rb`
|
71
|
+
to `vagrant-spec.config.rb` and modify it to valid values. The places you
|
72
|
+
should fill in are clearly marked. Highly recommend to download a box and
|
73
|
+
specify a local path to it.
|
74
|
+
|
75
|
+
Run acceptance tests:
|
76
|
+
|
77
|
+
```
|
78
|
+
$ rake acceptance:run
|
79
|
+
...
|
80
|
+
```
|
data/Gemfile
CHANGED
@@ -10,4 +10,5 @@ group :development do
|
|
10
10
|
# gem dependency because we expect to be installed within the
|
11
11
|
# Vagrant environment itself using `vagrant plugin`.
|
12
12
|
gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.7.1'
|
13
|
+
gem 'vagrant-spec', git: 'git://github.com/mitchellh/vagrant-spec.git'
|
13
14
|
end
|
data/Vagrantfile
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
Vagrant.configure('2') do |config|
|
2
|
+
# Configure base box parameters
|
3
|
+
config.vm.define 'ubuntu' do |u|
|
4
|
+
u.vm.hostname = 'my-super-vm.do.sw.ru'
|
5
|
+
|
6
|
+
# u.vm.network :forwarded_port, guest: 53, host: 53100, protocol: 'tcp'
|
7
|
+
# u.vm.network :forwarded_port, guest: 53, host: 53000, protocol: 'udp'
|
8
|
+
|
9
|
+
# u.vm.provider 'parallels' do |prl|
|
10
|
+
# prl.regen_box_uuid = false
|
11
|
+
# prl.customize("pre-boot" , ["set", :id, "--device-add", "serial", "--output", "/path/to/serial_out.txt"])
|
12
|
+
# end
|
13
|
+
|
14
|
+
# u.vm.network 'private_network', ip: '192.168.255.3', netmask: '255.255.255.0'
|
15
|
+
# u.vm.network 'private_network', ip: '172.16.0.200', netmask: '255.255.0.0'
|
16
|
+
# u.vm.synced_folder '.', "/opt/ololo", disabled: true
|
17
|
+
|
18
|
+
u.vm.provider 'parallels' do |v|
|
19
|
+
#v.update_guest_tools = true
|
20
|
+
end
|
21
|
+
|
22
|
+
u.vm.box = 'parallels/ubuntu-14.04'
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
config.vm.define 'ubuntu_2' do |u|
|
27
|
+
u.vm.box = 'parallels/ubuntu-14.04'
|
28
|
+
u.vm.network 'private_network', ip: '172.16.0.210', netmask: '255.255.0.0'
|
29
|
+
u.vm.network 'public_network' #, bridge: 'en0'
|
30
|
+
end
|
31
|
+
|
32
|
+
config.vm.define 'centos' do |c|
|
33
|
+
c.vm.provider 'parallels' do |v|
|
34
|
+
#v.check_guest_tools = false
|
35
|
+
#v.optimize_power_consumption = false
|
36
|
+
#v.update_guest_tools = true
|
37
|
+
# v.memory = "512"
|
38
|
+
# v.cpus = 1
|
39
|
+
#v.name = 'OLOLONAME'
|
40
|
+
v.regen_box_uuid = false
|
41
|
+
end
|
42
|
+
|
43
|
+
c.vm.provider "parallels" do |v|
|
44
|
+
v.customize ["set", :id, "--smart-mount", "off"]
|
45
|
+
v.customize ["set", :id, "--shared-profile", "off"]
|
46
|
+
v.customize ["set", :id, "--shared-cloud", "off"]
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
c.vm.provider "parallels" do |v|
|
51
|
+
v.customize("post-import", ["set", :id, "--device-add", "serial", "--output", "/Users/legal/serial_out.txt"])
|
52
|
+
v.customize ["set", :id, "--device-set", "serial0", "--output", "/Users/legal/serial_out.txt"]
|
53
|
+
end
|
54
|
+
|
55
|
+
# c.vm.network 'private_network', ip: '192.168.60.4'
|
56
|
+
# c.vm.network 'private_network', ip: '10.2.0.220', netmask: '255.255.0.0'
|
57
|
+
# c.vm.network 'public_network'
|
58
|
+
|
59
|
+
c.vm.hostname = 'my-funny-centos.do.sw.ru'
|
60
|
+
c.vm.box = 'parallels/centos-6.6'
|
61
|
+
|
62
|
+
c.vm.provision :shell do |s|
|
63
|
+
s.inline = 'echo Hello, World'
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
config.vm.provider 'parallels' do |v|
|
69
|
+
# v.longer_battery_life = false
|
70
|
+
v.check_guest_tools = true
|
71
|
+
# v.customize ["set", :id, "--device-set", "cdrom0", "--image",
|
72
|
+
# "/Users/legal/Downloads/prl-tools-lin-9.0.24172.951362.iso", "--connect"]
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
#config.vm.provision :chef_solo do |chef|
|
77
|
+
# chef.data_bags_path = "data_bags"
|
78
|
+
# chef.encrypted_data_bag_secret_key_path = "./data_bag_secret_file.sec"
|
79
|
+
#
|
80
|
+
# chef.log_level = "debug"
|
81
|
+
#
|
82
|
+
# chef.run_list = [
|
83
|
+
# "recipe[win_pdfm::default]"
|
84
|
+
# ]
|
85
|
+
#end
|
86
|
+
|
87
|
+
end
|
@@ -4,9 +4,12 @@ module VagrantPlugins
|
|
4
4
|
module NicMacAddresses
|
5
5
|
# Reads the network interface card MAC addresses and returns them.
|
6
6
|
#
|
7
|
-
# @return [Hash<
|
7
|
+
# @return [Hash<Integer, String>] Adapter => MAC address
|
8
8
|
def self.nic_mac_addresses(machine)
|
9
|
-
machine.provider.driver.read_mac_addresses
|
9
|
+
nic_macs = machine.provider.driver.read_mac_addresses
|
10
|
+
|
11
|
+
# Make numeration starting from 1, as it is expected in Vagrant.
|
12
|
+
Hash[nic_macs.map{ |index, mac| [index+1, mac] }]
|
10
13
|
end
|
11
14
|
end
|
12
15
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
namespace :acceptance do
|
2
|
+
desc "shows components that can be tested separately"
|
3
|
+
task :components do
|
4
|
+
exec("bundle exec vagrant-spec components")
|
5
|
+
end
|
6
|
+
|
7
|
+
desc "runs acceptance tests using vagrant-spec"
|
8
|
+
task :run do
|
9
|
+
components = %w(
|
10
|
+
basic
|
11
|
+
network/forwarded_port
|
12
|
+
network/private_network
|
13
|
+
synced_folder
|
14
|
+
synced_folder/nfs
|
15
|
+
synced_folder/rsync
|
16
|
+
provisioner/shell
|
17
|
+
provisioner/chef-solo
|
18
|
+
package
|
19
|
+
).map{ |s| "provider/parallels/#{s}" }
|
20
|
+
|
21
|
+
command = "bundle exec vagrant-spec test --components=#{components.join(" ")}"
|
22
|
+
puts command
|
23
|
+
puts
|
24
|
+
exec(command)
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# This tests that synced folders work with a given provider.
|
2
|
+
shared_examples "provider/synced_folder" do |provider, options|
|
3
|
+
if !options[:box]
|
4
|
+
raise ArgumentError,
|
5
|
+
"box option must be specified for provider: #{provider}"
|
6
|
+
end
|
7
|
+
|
8
|
+
include_context "acceptance"
|
9
|
+
|
10
|
+
before do
|
11
|
+
environment.skeleton("synced_folder")
|
12
|
+
assert_execute("vagrant", "box", "add", "basic", options[:box])
|
13
|
+
assert_execute("vagrant", "up", "--provider=#{provider}")
|
14
|
+
end
|
15
|
+
|
16
|
+
after do
|
17
|
+
assert_execute("vagrant", "destroy", "--force")
|
18
|
+
end
|
19
|
+
|
20
|
+
it "properly configures synced folder types" do
|
21
|
+
status("Test: mounts the default /vagrant synced folder")
|
22
|
+
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
|
23
|
+
expect(result.exit_code).to eql(0)
|
24
|
+
expect(result.stdout).to match(/hello$/)
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
hello
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require_relative 'test/acceptance/base'
|
2
|
+
|
3
|
+
Vagrant::Spec::Acceptance.configure do |c|
|
4
|
+
c.component_paths << File.expand_path('../test/acceptance', __FILE__)
|
5
|
+
c.skeleton_paths << File.expand_path('../test/acceptance/skeletons', __FILE__)
|
6
|
+
|
7
|
+
c.provider 'parallels',
|
8
|
+
box: 'ENTER BOX URL',
|
9
|
+
contexts: ['provider-context/parallels'],
|
10
|
+
features: ['!network/forwarded_port', '!cli/plugin']
|
11
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-parallels
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Zholobov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -156,8 +156,14 @@ files:
|
|
156
156
|
- locales/en.yml
|
157
157
|
- Rakefile
|
158
158
|
- README.md
|
159
|
+
- tasks/acceptance.rake
|
159
160
|
- tasks/bundler.rake
|
160
161
|
- tasks/test.rake
|
162
|
+
- test/acceptance/base.rb
|
163
|
+
- test/acceptance/provider/synced_folder_spec.rb
|
164
|
+
- test/acceptance/shared/context_parallels.rb
|
165
|
+
- test/acceptance/skeletons/synced_folder/foo
|
166
|
+
- test/acceptance/skeletons/synced_folder/Vagrantfile
|
161
167
|
- test/unit/base.rb
|
162
168
|
- test/unit/config_test.rb
|
163
169
|
- test/unit/driver/pd_10_test.rb
|
@@ -168,6 +174,8 @@ files:
|
|
168
174
|
- test/unit/support/shared/pd_driver_examples.rb
|
169
175
|
- test/unit/synced_folder_test.rb
|
170
176
|
- vagrant-parallels.gemspec
|
177
|
+
- vagrant-spec.config.example.rb
|
178
|
+
- Vagrantfile
|
171
179
|
- .gitignore
|
172
180
|
- .travis.yml
|
173
181
|
homepage: http://github.com/Parallels/vagrant-parallels
|