vagrant-skytap 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/vagrant-skytap/action/add_vm_to_environment.rb +4 -4
- data/lib/vagrant-skytap/action/compose_environment.rb +131 -0
- data/lib/vagrant-skytap/action/create_environment.rb +3 -1
- data/lib/vagrant-skytap/action/initialize_api_client.rb +6 -5
- data/lib/vagrant-skytap/action/set_up_vm.rb +3 -1
- data/lib/vagrant-skytap/action/store_extra_data.rb +4 -2
- data/lib/vagrant-skytap/action.rb +4 -17
- data/lib/vagrant-skytap/api/environment.rb +53 -25
- data/lib/vagrant-skytap/api/vm.rb +9 -3
- data/lib/vagrant-skytap/command/up.rb +46 -30
- data/lib/vagrant-skytap/errors.rb +4 -0
- data/lib/vagrant-skytap/version.rb +1 -1
- data/locales/en.yml +5 -1
- data/spec/unit/actions/compose_environment_spec.rb +101 -0
- data/spec/unit/environment_spec.rb +26 -45
- data/spec/unit/support/shared/skytap_context.rb +5 -0
- data/vagrant-skytap.gemspec +3 -3
- metadata +9 -311
- data/.byebug_history +0 -256
- data/.project +0 -11
- data/_patches-20160112/0 +0 -388
- data/_patches-20160112/1 +0 -82
- data/_patches-20160112/2 +0 -239
- data/_patches-20160112/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160112/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160112/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160112/acceptance-test-runner +0 -29
- data/_patches-20160112/ansible-1 +0 -92
- data/_patches-20160112/cache-api-client-in-up +0 -40
- data/_patches-20160112/dead-code-in-actions +0 -44
- data/_patches-20160112/debug-changes +0 -42
- data/_patches-20160112/demo-rails-app +0 -1276
- data/_patches-20160112/eng-10166-halt-spec +0 -40
- data/_patches-20160112/eng-10256 +0 -527
- data/_patches-20160112/eng-10256-2 +0 -162
- data/_patches-20160112/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160112/eng-10269-test-stuff +0 -87
- data/_patches-20160112/eng-10269-wtf +0 -119
- data/_patches-20160112/eng-10369 +0 -143
- data/_patches-20160112/eng-10369-tmp +0 -60
- data/_patches-20160112/eng-10919 +0 -56
- data/_patches-20160112/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160112/eng-11442 +0 -4
- data/_patches-20160112/eng-11616 +0 -403
- data/_patches-20160112/eng-11616-2 +0 -67
- data/_patches-20160112/eng-11616-actual +0 -184
- data/_patches-20160112/eng-11625a +0 -4
- data/_patches-20160112/eng-11711 +0 -85
- data/_patches-20160112/eng-12232-command-spec +0 -236
- data/_patches-20160112/eng-12235 +0 -83
- data/_patches-20160112/eng-12235-override-refactor +0 -140
- data/_patches-20160112/eng-12240 +0 -103
- data/_patches-20160112/eng-12249 +0 -40
- data/_patches-20160112/eng-12301 +0 -50
- data/_patches-20160112/eng-12843 +0 -95
- data/_patches-20160112/env-source +0 -112
- data/_patches-20160112/frickin-vagrant-spec +0 -163
- data/_patches-20160112/gem-pre-version +0 -14
- data/_patches-20160112/gems-old +0 -9
- data/_patches-20160112/googles-specs +0 -713
- data/_patches-20160112/local-configs-ignore +0 -61
- data/_patches-20160112/misc +0 -79
- data/_patches-20160112/network-unreachable +0 -31
- data/_patches-20160112/new-boxfile +0 -288
- data/_patches-20160112/parallelization-maybe +0 -198
- data/_patches-20160112/read-state +0 -23
- data/_patches-20160112/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160112/series +0 -60
- data/_patches-20160112/status +0 -12
- data/_patches-20160112/test-move-env-data +0 -231
- data/_patches-20160112/test-vagrantfile-vm1 +0 -167
- data/_patches-20160112/the_version_in_0.1.13.pre1 +0 -598
- data/_patches-20160112/vagrant-spec-mock-api +0 -137
- data/_patches-20160112/vagrant-vmware-plugin +0 -233
- data/_patches-20160112/vagrantfile +0 -403
- data/_patches-20160112/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160112/vagrantfile-for-nick +0 -95
- data/_patches-20160112/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160112/vm-vanished +0 -42
- data/_patches-20160112a/01 +0 -148
- data/_patches-20160112a/2 +0 -239
- data/_patches-20160112a/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112a/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160112a/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112a/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160112a/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112a/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160112a/acceptance-test-runner +0 -29
- data/_patches-20160112a/ansible-1 +0 -92
- data/_patches-20160112a/cache-api-client-in-up +0 -40
- data/_patches-20160112a/dead-code-in-actions +0 -44
- data/_patches-20160112a/debug-changes +0 -42
- data/_patches-20160112a/demo-rails-app +0 -1276
- data/_patches-20160112a/eng-10166-halt-spec +0 -40
- data/_patches-20160112a/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160112a/eng-10269-test-stuff +0 -87
- data/_patches-20160112a/eng-10269-wtf +0 -119
- data/_patches-20160112a/eng-10369 +0 -143
- data/_patches-20160112a/eng-10369-tmp +0 -60
- data/_patches-20160112a/eng-10919 +0 -56
- data/_patches-20160112a/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160112a/eng-11442 +0 -4
- data/_patches-20160112a/eng-11616 +0 -403
- data/_patches-20160112a/eng-11616-2 +0 -67
- data/_patches-20160112a/eng-11616-actual +0 -184
- data/_patches-20160112a/eng-11625a +0 -4
- data/_patches-20160112a/eng-11711 +0 -85
- data/_patches-20160112a/eng-12232-command-spec +0 -236
- data/_patches-20160112a/eng-12235 +0 -83
- data/_patches-20160112a/eng-12235-override-refactor +0 -140
- data/_patches-20160112a/eng-12240 +0 -103
- data/_patches-20160112a/eng-12249 +0 -40
- data/_patches-20160112a/eng-12301 +0 -50
- data/_patches-20160112a/eng-12843 +0 -95
- data/_patches-20160112a/env-source +0 -112
- data/_patches-20160112a/frickin-vagrant-spec +0 -163
- data/_patches-20160112a/gem-pre-version +0 -14
- data/_patches-20160112a/gems-old +0 -9
- data/_patches-20160112a/googles-specs +0 -713
- data/_patches-20160112a/local-configs-ignore +0 -61
- data/_patches-20160112a/misc +0 -79
- data/_patches-20160112a/network-unreachable +0 -31
- data/_patches-20160112a/new-boxfile +0 -288
- data/_patches-20160112a/parallelization-maybe +0 -198
- data/_patches-20160112a/read-state +0 -23
- data/_patches-20160112a/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160112a/series +0 -58
- data/_patches-20160112a/status +0 -14
- data/_patches-20160112a/test-move-env-data +0 -231
- data/_patches-20160112a/test-vagrantfile-vm1 +0 -167
- data/_patches-20160112a/the_version_in_0.1.13.pre1 +0 -612
- data/_patches-20160112a/then-copy-the-newer-files +0 -632
- data/_patches-20160112a/vagrant-spec-mock-api +0 -137
- data/_patches-20160112a/vagrant-vmware-plugin +0 -233
- data/_patches-20160112a/vagrantfile +0 -403
- data/_patches-20160112a/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160112a/vagrantfile-for-nick +0 -95
- data/_patches-20160112a/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160112a/vm-vanished +0 -42
- data/_patches-20160113/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160113/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160113/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160113/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160113/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160113/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160113/acceptance-test-runner +0 -29
- data/_patches-20160113/ansible-1 +0 -92
- data/_patches-20160113/cache-api-client-in-up +0 -40
- data/_patches-20160113/dead-code-in-actions +0 -44
- data/_patches-20160113/debug-changes +0 -55
- data/_patches-20160113/demo-rails-app +0 -1276
- data/_patches-20160113/eng-10166-halt-spec +0 -40
- data/_patches-20160113/eng-10256 +0 -543
- data/_patches-20160113/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160113/eng-10269-test-stuff +0 -87
- data/_patches-20160113/eng-10269-wtf +0 -119
- data/_patches-20160113/eng-10369 +0 -143
- data/_patches-20160113/eng-10369-tmp +0 -60
- data/_patches-20160113/eng-10919 +0 -56
- data/_patches-20160113/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160113/eng-11442 +0 -4
- data/_patches-20160113/eng-11616 +0 -403
- data/_patches-20160113/eng-11616-2 +0 -67
- data/_patches-20160113/eng-11616-actual +0 -184
- data/_patches-20160113/eng-11625a +0 -4
- data/_patches-20160113/eng-11711 +0 -85
- data/_patches-20160113/eng-12232-command-spec +0 -236
- data/_patches-20160113/eng-12235 +0 -83
- data/_patches-20160113/eng-12235-override-refactor +0 -140
- data/_patches-20160113/eng-12240 +0 -103
- data/_patches-20160113/eng-12249 +0 -40
- data/_patches-20160113/eng-12301 +0 -50
- data/_patches-20160113/eng-12720 +0 -47
- data/_patches-20160113/eng-12843 +0 -95
- data/_patches-20160113/env-source +0 -112
- data/_patches-20160113/frickin-vagrant-spec +0 -163
- data/_patches-20160113/gem-pre-version +0 -14
- data/_patches-20160113/gems-old +0 -9
- data/_patches-20160113/googles-specs +0 -713
- data/_patches-20160113/local-configs-ignore +0 -61
- data/_patches-20160113/misc +0 -79
- data/_patches-20160113/network-unreachable +0 -31
- data/_patches-20160113/new-boxfile +0 -288
- data/_patches-20160113/parallelization-maybe +0 -198
- data/_patches-20160113/read-state +0 -23
- data/_patches-20160113/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160113/series +0 -56
- data/_patches-20160113/status +0 -14
- data/_patches-20160113/test-move-env-data +0 -231
- data/_patches-20160113/test-vagrantfile-vm1 +0 -167
- data/_patches-20160113/vagrant-spec-mock-api +0 -137
- data/_patches-20160113/vagrant-vmware-plugin +0 -233
- data/_patches-20160113/vagrantfile +0 -403
- data/_patches-20160113/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160113/vagrantfile-for-nick +0 -95
- data/_patches-20160113/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160113/vm-vanished +0 -42
- data/_patches-20160118/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160118/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160118/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160118/acceptance-test-runner +0 -29
- data/_patches-20160118/ansible-1 +0 -92
- data/_patches-20160118/cache-api-client-in-up +0 -40
- data/_patches-20160118/dead-code-in-actions +0 -44
- data/_patches-20160118/debug-changes +0 -55
- data/_patches-20160118/demo-rails-app +0 -1276
- data/_patches-20160118/eng-10166-halt-spec +0 -40
- data/_patches-20160118/eng-10256 +0 -554
- data/_patches-20160118/eng-10256-cr +0 -314
- data/_patches-20160118/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160118/eng-10269-test-stuff +0 -87
- data/_patches-20160118/eng-10269-wtf +0 -119
- data/_patches-20160118/eng-10369 +0 -143
- data/_patches-20160118/eng-10369-tmp +0 -60
- data/_patches-20160118/eng-10919 +0 -56
- data/_patches-20160118/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160118/eng-11442 +0 -4
- data/_patches-20160118/eng-11616 +0 -403
- data/_patches-20160118/eng-11616-2 +0 -67
- data/_patches-20160118/eng-11616-actual +0 -184
- data/_patches-20160118/eng-11625a +0 -4
- data/_patches-20160118/eng-11711 +0 -85
- data/_patches-20160118/eng-12232-command-spec +0 -236
- data/_patches-20160118/eng-12235 +0 -83
- data/_patches-20160118/eng-12235-override-refactor +0 -140
- data/_patches-20160118/eng-12240 +0 -103
- data/_patches-20160118/eng-12249 +0 -40
- data/_patches-20160118/eng-12301 +0 -50
- data/_patches-20160118/eng-12720 +0 -74
- data/_patches-20160118/eng-12843 +0 -95
- data/_patches-20160118/eng-13040 +0 -291
- data/_patches-20160118/env-source +0 -112
- data/_patches-20160118/frickin-vagrant-spec +0 -163
- data/_patches-20160118/gem-pre-version +0 -14
- data/_patches-20160118/gems-old +0 -9
- data/_patches-20160118/googles-specs +0 -713
- data/_patches-20160118/local-configs-ignore +0 -61
- data/_patches-20160118/misc +0 -79
- data/_patches-20160118/network-unreachable +0 -31
- data/_patches-20160118/new-boxfile +0 -288
- data/_patches-20160118/parallelization-maybe +0 -198
- data/_patches-20160118/port-forwarding-processes +0 -87
- data/_patches-20160118/read-state +0 -23
- data/_patches-20160118/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160118/series +0 -59
- data/_patches-20160118/status +0 -13
- data/_patches-20160118/test-move-env-data +0 -231
- data/_patches-20160118/test-vagrantfile-vm1 +0 -167
- data/_patches-20160118/vagrant-spec-mock-api +0 -137
- data/_patches-20160118/vagrant-vmware-plugin +0 -233
- data/_patches-20160118/vagrantfile +0 -403
- data/_patches-20160118/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160118/vagrantfile-for-nick +0 -95
- data/_patches-20160118/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160118/vm-vanished +0 -42
- data/_patches-20160118a/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118a/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160118a/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118a/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160118a/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118a/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160118a/acceptance-test-runner +0 -29
- data/_patches-20160118a/ansible-1 +0 -92
- data/_patches-20160118a/bar +0 -189
- data/_patches-20160118a/cache-api-client-in-up +0 -40
- data/_patches-20160118a/dead-code-in-actions +0 -44
- data/_patches-20160118a/debug-changes +0 -55
- data/_patches-20160118a/demo-rails-app +0 -1276
- data/_patches-20160118a/eng-10166-halt-spec +0 -40
- data/_patches-20160118a/eng-10256 +0 -554
- data/_patches-20160118a/eng-10256-cr +0 -314
- data/_patches-20160118a/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160118a/eng-10269-test-stuff +0 -87
- data/_patches-20160118a/eng-10269-wtf +0 -119
- data/_patches-20160118a/eng-10369 +0 -143
- data/_patches-20160118a/eng-10369-tmp +0 -60
- data/_patches-20160118a/eng-10919 +0 -56
- data/_patches-20160118a/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160118a/eng-11442 +0 -4
- data/_patches-20160118a/eng-11616 +0 -403
- data/_patches-20160118a/eng-11616-2 +0 -67
- data/_patches-20160118a/eng-11616-actual +0 -184
- data/_patches-20160118a/eng-11625a +0 -4
- data/_patches-20160118a/eng-11711 +0 -85
- data/_patches-20160118a/eng-12232-command-spec +0 -236
- data/_patches-20160118a/eng-12235 +0 -83
- data/_patches-20160118a/eng-12235-override-refactor +0 -140
- data/_patches-20160118a/eng-12240 +0 -103
- data/_patches-20160118a/eng-12249 +0 -40
- data/_patches-20160118a/eng-12301 +0 -50
- data/_patches-20160118a/eng-12720 +0 -74
- data/_patches-20160118a/eng-12843 +0 -95
- data/_patches-20160118a/eng-13040 +0 -291
- data/_patches-20160118a/env-source +0 -112
- data/_patches-20160118a/foo +0 -169
- data/_patches-20160118a/frickin-vagrant-spec +0 -163
- data/_patches-20160118a/gem-pre-version +0 -14
- data/_patches-20160118a/gems-old +0 -9
- data/_patches-20160118a/googles-specs +0 -713
- data/_patches-20160118a/guestport-madness +0 -59
- data/_patches-20160118a/local-configs-ignore +0 -61
- data/_patches-20160118a/misc +0 -79
- data/_patches-20160118a/network-unreachable +0 -31
- data/_patches-20160118a/new-boxfile +0 -288
- data/_patches-20160118a/parallelization-maybe +0 -198
- data/_patches-20160118a/port-forwarding-processes +0 -87
- data/_patches-20160118a/read-state +0 -23
- data/_patches-20160118a/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160118a/series +0 -62
- data/_patches-20160118a/status +0 -14
- data/_patches-20160118a/test-move-env-data +0 -231
- data/_patches-20160118a/test-vagrantfile-vm1 +0 -167
- data/_patches-20160118a/vagrant-spec-mock-api +0 -137
- data/_patches-20160118a/vagrant-vmware-plugin +0 -233
- data/_patches-20160118a/vagrantfile +0 -403
- data/_patches-20160118a/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160118a/vagrantfile-for-nick +0 -95
- data/_patches-20160118a/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160118a/vm-vanished +0 -42
@@ -1,25 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent 37bcd8389c3f5d6e1d618b020c7decf7949a2f25
|
3
|
-
diff -r 37bcd8389c3f -r febe6d83e803 lib/vagrant-skytap/action/prepare_nfs_settings.rb
|
4
|
-
--- a/lib/vagrant-skytap/action/prepare_nfs_settings.rb Wed Dec 02 17:37:41 2015 -0800
|
5
|
-
+++ b/lib/vagrant-skytap/action/prepare_nfs_settings.rb Wed Dec 02 17:37:46 2015 -0800
|
6
|
-
@@ -15,7 +15,7 @@
|
7
|
-
|
8
|
-
if using_nfs?
|
9
|
-
env[:nfs_host_ip] = read_host_ip
|
10
|
-
- env[:nfs_machine_ip] = read_machine_ip
|
11
|
-
+ env[:nfs_machine_ip] = machine.provider.capability(:public_address)
|
12
|
-
end
|
13
|
-
|
14
|
-
@app.call(env)
|
15
|
-
@@ -35,10 +35,6 @@
|
16
|
-
@logger.debug "read_host_ip returning #{ret}"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
-
|
20
|
-
- def read_machine_ip
|
21
|
-
- machine.ssh_info[:host]
|
22
|
-
- end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/_patches-20160113/series
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
gem-pre-version
|
2
|
-
local-configs-ignore
|
3
|
-
debug-changes
|
4
|
-
acceptance-test-runner
|
5
|
-
gems-old
|
6
|
-
vagrantfile
|
7
|
-
vagrantfile-for-acceptance-tests
|
8
|
-
CR-ABOVE-THIS-LINE
|
9
|
-
CR-BELOW-THIS-LINE
|
10
|
-
COMPLETED-ABOVE-THIS-LINE
|
11
|
-
COMPLETED-BELOW-THIS-LINE
|
12
|
-
WIP-ABOVE-THIS-LINE
|
13
|
-
eng-10256
|
14
|
-
eng-12720
|
15
|
-
eng-10256-ubuntu-testing
|
16
|
-
eng-12843
|
17
|
-
test-vagrantfile-vm1
|
18
|
-
eng-12235-override-refactor
|
19
|
-
eng-12232-command-spec
|
20
|
-
eng-12235
|
21
|
-
frickin-vagrant-spec
|
22
|
-
eng-12249
|
23
|
-
cache-api-client-in-up
|
24
|
-
eng-12301
|
25
|
-
vagrantfiles-to-forget-what-they-are-for
|
26
|
-
eng-12240
|
27
|
-
vagrantfile-for-nick
|
28
|
-
refactor-to-use-public_address-cap
|
29
|
-
eng-10269-test-stuff
|
30
|
-
demo-rails-app
|
31
|
-
read-state
|
32
|
-
eng-11616
|
33
|
-
eng-11616-2
|
34
|
-
eng-11616-actual
|
35
|
-
eng-10269-wtf
|
36
|
-
parallelization-maybe
|
37
|
-
eng-10369
|
38
|
-
vm-vanished
|
39
|
-
eng-10369-tmp
|
40
|
-
eng-11625a
|
41
|
-
eng-11711
|
42
|
-
network-unreachable
|
43
|
-
eng-11442
|
44
|
-
WIP-BELOW-THIS-LINE
|
45
|
-
new-boxfile
|
46
|
-
ansible-1
|
47
|
-
misc
|
48
|
-
vagrant-spec-mock-api
|
49
|
-
eng-10919
|
50
|
-
env-source
|
51
|
-
eng-11177-fix-actions-requires
|
52
|
-
dead-code-in-actions
|
53
|
-
eng-10166-halt-spec
|
54
|
-
vagrant-vmware-plugin
|
55
|
-
test-move-env-data
|
56
|
-
googles-specs
|
data/_patches-20160113/status
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
813456f18a2d7810c0785efa925e2516a7fa5729:gem-pre-version
|
2
|
-
b2aa1fa1e5603d434a08013f830ca256a0944559:local-configs-ignore
|
3
|
-
8b7cd26eeade2876b64f39996604ebdf79f0735b:debug-changes
|
4
|
-
cc8d3b881c81b5b63d4918f8222d2511bcb3ebe2:acceptance-test-runner
|
5
|
-
ce30cdd02e7fcccbbc1ae26a7f598ee12fe51597:gems-old
|
6
|
-
9dea91c68ac02d8adec059467531819026e8ffe6:vagrantfile
|
7
|
-
4020bb91ddc0b0ebd023b5ccf2fdbe2565140e11:vagrantfile-for-acceptance-tests
|
8
|
-
92d884250217299af22f280078a592de4df76ab8:CR-ABOVE-THIS-LINE
|
9
|
-
0b09fa02e47290ea04fd50bc325b8d24496aa999:CR-BELOW-THIS-LINE
|
10
|
-
944d970d7d4246f5a22d18d5649b7d3609fbca98:COMPLETED-ABOVE-THIS-LINE
|
11
|
-
ea8196f44f23de0982b59f37125238cb2fcf5b07:COMPLETED-BELOW-THIS-LINE
|
12
|
-
c16d73c17f55bd5e4df485673953831cf65101cd:WIP-ABOVE-THIS-LINE
|
13
|
-
0f0cb39f96fbe679003e72deeabb4238f94bbf1d:eng-10256
|
14
|
-
9f25b2272029f32a673e775c6056e88c6396f01e:eng-12720
|
@@ -1,231 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent b53e5fb4613bca1379e20e6d91ee14addfca153a
|
3
|
-
tests for separating environment data
|
4
|
-
|
5
|
-
diff --git a/lib/vagrant-skytap/action/create_environment.rb b/lib/vagrant-skytap/action/create_environment.rb
|
6
|
-
--- a/lib/vagrant-skytap/action/create_environment.rb
|
7
|
-
+++ b/lib/vagrant-skytap/action/create_environment.rb
|
8
|
-
@@ -28,7 +28,8 @@
|
9
|
-
def call(env)
|
10
|
-
environment = API::Environment.create!(env, template_url)
|
11
|
-
env[:environment] = environment
|
12
|
-
- environment.global_properties.write('url' => environment.url)
|
13
|
-
+ write_environment_url(environment.url)
|
14
|
-
+ #environment.global_properties.write('url' => environment.url)
|
15
|
-
environment.wait_until_ready
|
16
|
-
|
17
|
-
#TODO:NLA What's the right way to get this set? And where? Does it need to be set at all?
|
18
|
-
@@ -42,6 +43,10 @@
|
19
|
-
def template_url
|
20
|
-
env[:machine].provider_config.template_url
|
21
|
-
end
|
22
|
-
+
|
23
|
-
+ def write_environment_url(url)
|
24
|
-
+ env[:environment].global_properties.write('url' => url)
|
25
|
-
+ end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
|
30
|
-
--- a/spec/spec_helper.rb
|
31
|
-
+++ b/spec/spec_helper.rb
|
32
|
-
@@ -1,1 +1,7 @@
|
33
|
-
-
|
34
|
-
+require "unit/support/dummy_communicator"
|
35
|
-
+require "unit/support/dummy_provider"
|
36
|
-
+require "unit/support/shared/base_context"
|
37
|
-
+require "unit/support/shared/action_synced_folders_context"
|
38
|
-
+require "unit/support/shared/capability_helpers_context"
|
39
|
-
+require "unit/support/shared/plugin_command_context"
|
40
|
-
+require "unit/support/shared/virtualbox_context"
|
41
|
-
diff --git a/spec/support/isolated_environment.rb b/spec/support/isolated_environment.rb
|
42
|
-
new file mode 100644
|
43
|
-
--- /dev/null
|
44
|
-
+++ b/spec/support/isolated_environment.rb
|
45
|
-
@@ -0,0 +1,45 @@
|
46
|
-
+require "fileutils"
|
47
|
-
+require "pathname"
|
48
|
-
+require "tmpdir"
|
49
|
-
+
|
50
|
-
+require "log4r"
|
51
|
-
+
|
52
|
-
+# This class manages an isolated environment for Vagrant to
|
53
|
-
+# run in. It creates a temporary directory to act as the
|
54
|
-
+# working directory as well as sets a custom home directory.
|
55
|
-
+#
|
56
|
-
+# This class also provides various helpers to create Vagrantfiles,
|
57
|
-
+# boxes, etc.
|
58
|
-
+class IsolatedEnvironment
|
59
|
-
+ attr_reader :homedir
|
60
|
-
+ attr_reader :workdir
|
61
|
-
+
|
62
|
-
+ # Initializes an isolated environment. You can pass in some
|
63
|
-
+ # options here to configure runing custom applications in place
|
64
|
-
+ # of others as well as specifying environmental variables.
|
65
|
-
+ #
|
66
|
-
+ # @param [Hash] apps A mapping of application name (such as "vagrant")
|
67
|
-
+ # to an alternate full path to the binary to run.
|
68
|
-
+ # @param [Hash] env Additional environmental variables to inject
|
69
|
-
+ # into the execution environments.
|
70
|
-
+ def initialize
|
71
|
-
+ @logger = Log4r::Logger.new("test::isolated_environment")
|
72
|
-
+
|
73
|
-
+ # Create a temporary directory for our work
|
74
|
-
+ @tempdir = Dir.mktmpdir("vagrant")
|
75
|
-
+ @logger.info("Initialize isolated environment: #{@tempdir}")
|
76
|
-
+
|
77
|
-
+ # Setup the home and working directories
|
78
|
-
+ @homedir = Pathname.new(File.join(@tempdir, "home"))
|
79
|
-
+ @workdir = Pathname.new(File.join(@tempdir, "work"))
|
80
|
-
+
|
81
|
-
+ @homedir.mkdir
|
82
|
-
+ @workdir.mkdir
|
83
|
-
+ end
|
84
|
-
+
|
85
|
-
+ # This closes the environment by cleaning it up.
|
86
|
-
+ def close
|
87
|
-
+ @logger.info("Removing isolated environment: #{@tempdir}")
|
88
|
-
+ FileUtils.rm_rf(@tempdir)
|
89
|
-
+ end
|
90
|
-
+end
|
91
|
-
diff --git a/spec/vagrant-skytap/config_spec.rb b/spec/unit/config_spec.rb
|
92
|
-
rename from spec/vagrant-skytap/config_spec.rb
|
93
|
-
rename to spec/unit/config_spec.rb
|
94
|
-
diff --git a/spec/unit/create_environment_spec.rb b/spec/unit/create_environment_spec.rb
|
95
|
-
new file mode 100644
|
96
|
-
--- /dev/null
|
97
|
-
+++ b/spec/unit/create_environment_spec.rb
|
98
|
-
@@ -0,0 +1,81 @@
|
99
|
-
+require 'spec_helper'
|
100
|
-
+require 'vagrant-skytap/action/create_environment'
|
101
|
-
+
|
102
|
-
+describe VagrantPlugins::Skytap::Action::CreateEnvironment do
|
103
|
-
+ include_context "unit"
|
104
|
-
+
|
105
|
-
+ let(:iso_env) do
|
106
|
-
+ # We have to create a Vagrantfile so there is a root path
|
107
|
-
+ env = isolated_environment
|
108
|
-
+ env.vagrantfile("")
|
109
|
-
+ env.create_vagrant_env
|
110
|
-
+ end
|
111
|
-
+
|
112
|
-
+ #let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
|
113
|
-
+ let(:machine) do
|
114
|
-
+ iso_env.machine(iso_env.machine_names[0], :dummy).tap do |m|
|
115
|
-
+ m.provider.stub(driver: driver)
|
116
|
-
+ end
|
117
|
-
+ end
|
118
|
-
+
|
119
|
-
+ # let(:app) { nil }
|
120
|
-
+ # let(:env) { {} }
|
121
|
-
+ # subject(:action) { described_class.new(app, env) }
|
122
|
-
+ let(:env) {{ machine: machine }}
|
123
|
-
+ let(:app) { lambda { |*args| }}
|
124
|
-
+ let(:driver) { double("driver") }
|
125
|
-
+ let(:host) { double("host") }
|
126
|
-
+
|
127
|
-
+ subject { described_class.new(app, env) }
|
128
|
-
+
|
129
|
-
+ before do
|
130
|
-
+ env[:test] = true
|
131
|
-
+ allow(machine.env).to receive(:host) { host }
|
132
|
-
+ allow(host).to receive(:capability).with(:nfs_installed) { true }
|
133
|
-
+ end
|
134
|
-
+
|
135
|
-
+
|
136
|
-
+ it "calls the next action in the chain" do
|
137
|
-
+ driver.stub(read_network_interfaces: {2 => {type: :hostonly, hostonly: "vmnet2"}})
|
138
|
-
+ driver.stub(read_host_only_interfaces: [{name: "vmnet2", ip: "1.2.3.4"}])
|
139
|
-
+ allow(driver).to receive(:read_guest_ip).with(1).and_return("2.3.4.5")
|
140
|
-
+
|
141
|
-
+ called = false
|
142
|
-
+ app = lambda { |*args| called = true }
|
143
|
-
+
|
144
|
-
+ action = described_class.new(app, env)
|
145
|
-
+ action.call(env)
|
146
|
-
+
|
147
|
-
+ expect(called).to eq(true)
|
148
|
-
+ end
|
149
|
-
+
|
150
|
-
+ # describe '#template_url' do
|
151
|
-
+ # subject(:args) { action.template_url }
|
152
|
-
+ #
|
153
|
-
+ # context 'with no ssh options' do
|
154
|
-
+ # let(:options) { [] }
|
155
|
-
+ #
|
156
|
-
+ # it { should eql [] }
|
157
|
-
+ # end
|
158
|
-
+ #
|
159
|
-
+ # context 'with one option' do
|
160
|
-
+ # let(:options) { ['StrictHostKeyChecking=no'] }
|
161
|
-
+ # it { should eql ["-o 'StrictHostKeyChecking=no'"] }
|
162
|
-
+ # end
|
163
|
-
+ #
|
164
|
-
+ # context 'with multiple options' do
|
165
|
-
+ # let(:options) { ['SHKC=no', 'Port=222'] }
|
166
|
-
+ # it { should eql ["-o 'SHKC=no'", "-o 'Port=222'"] }
|
167
|
-
+ # end
|
168
|
-
+ # end
|
169
|
-
+
|
170
|
-
+ describe '#write_environment_url' do
|
171
|
-
+ subject(:args) { 'http://foo/bar' }
|
172
|
-
+
|
173
|
-
+ context 'whatever' do
|
174
|
-
+ #let(:options) { [] }
|
175
|
-
+
|
176
|
-
+ it { should eql 'http://foo/bar' }
|
177
|
-
+ end
|
178
|
-
+ end
|
179
|
-
+end
|
180
|
-
diff --git a/spec/unit/environment_spec.rb b/spec/unit/environment_spec.rb
|
181
|
-
new file mode 100644
|
182
|
-
--- /dev/null
|
183
|
-
+++ b/spec/unit/environment_spec.rb
|
184
|
-
@@ -0,0 +1,23 @@
|
185
|
-
+require 'vagrant-skytap/api/environment'
|
186
|
-
+
|
187
|
-
+describe VagrantPlugins::Skytap::API::Environment do
|
188
|
-
+ let(:attrs) { {} }
|
189
|
-
+ let(:env) { {} }
|
190
|
-
+ let(:instance) { described_class.new(attrs, env) }
|
191
|
-
+
|
192
|
-
+ describe "#busy?" do
|
193
|
-
+ context "it is busy" do
|
194
|
-
+ let(:runstate) { 'busy' }
|
195
|
-
+
|
196
|
-
+ #instance.busy?.should be_true
|
197
|
-
+ end
|
198
|
-
+
|
199
|
-
+
|
200
|
-
+# context "it is stopped" do
|
201
|
-
+# let(:runstate) { 'stopped' }
|
202
|
-
+#
|
203
|
-
+# instance.busy?.should be_false
|
204
|
-
+# end
|
205
|
-
+
|
206
|
-
+ end
|
207
|
-
+end
|
208
|
-
diff --git a/spec/vagrant-skytap/unit/support/dummy_communicator.rb b/spec/unit/support/dummy_communicator.rb
|
209
|
-
rename from spec/vagrant-skytap/unit/support/dummy_communicator.rb
|
210
|
-
rename to spec/unit/support/dummy_communicator.rb
|
211
|
-
diff --git a/spec/vagrant-skytap/unit/support/dummy_provider.rb b/spec/unit/support/dummy_provider.rb
|
212
|
-
rename from spec/vagrant-skytap/unit/support/dummy_provider.rb
|
213
|
-
rename to spec/unit/support/dummy_provider.rb
|
214
|
-
diff --git a/spec/vagrant-skytap/unit/support/isolated_environment.rb b/spec/unit/support/isolated_environment.rb
|
215
|
-
rename from spec/vagrant-skytap/unit/support/isolated_environment.rb
|
216
|
-
rename to spec/unit/support/isolated_environment.rb
|
217
|
-
diff --git a/spec/vagrant-skytap/unit/support/shared/action_synced_folders_context.rb b/spec/unit/support/shared/action_synced_folders_context.rb
|
218
|
-
rename from spec/vagrant-skytap/unit/support/shared/action_synced_folders_context.rb
|
219
|
-
rename to spec/unit/support/shared/action_synced_folders_context.rb
|
220
|
-
diff --git a/spec/vagrant-skytap/unit/support/shared/base_context.rb b/spec/unit/support/shared/base_context.rb
|
221
|
-
rename from spec/vagrant-skytap/unit/support/shared/base_context.rb
|
222
|
-
rename to spec/unit/support/shared/base_context.rb
|
223
|
-
diff --git a/spec/vagrant-skytap/unit/support/shared/capability_helpers_context.rb b/spec/unit/support/shared/capability_helpers_context.rb
|
224
|
-
rename from spec/vagrant-skytap/unit/support/shared/capability_helpers_context.rb
|
225
|
-
rename to spec/unit/support/shared/capability_helpers_context.rb
|
226
|
-
diff --git a/spec/vagrant-skytap/unit/support/shared/plugin_command_context.rb b/spec/unit/support/shared/plugin_command_context.rb
|
227
|
-
rename from spec/vagrant-skytap/unit/support/shared/plugin_command_context.rb
|
228
|
-
rename to spec/unit/support/shared/plugin_command_context.rb
|
229
|
-
diff --git a/spec/vagrant-skytap/unit/support/shared/virtualbox_context.rb b/spec/unit/support/shared/virtualbox_context.rb
|
230
|
-
rename from spec/vagrant-skytap/unit/support/shared/virtualbox_context.rb
|
231
|
-
rename to spec/unit/support/shared/virtualbox_context.rb
|
@@ -1,167 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent 0c6dac6a7f7675f19b0be8bd06286ac74627356c
|
3
|
-
diff -r 0c6dac6a7f76 -r a12a5438b54d vm1/Vagrantfile
|
4
|
-
--- a/vm1/Vagrantfile Wed Dec 23 17:24:01 2015 -0800
|
5
|
-
+++ b/vm1/Vagrantfile Wed Dec 23 17:24:39 2015 -0800
|
6
|
-
@@ -1,148 +1,26 @@
|
7
|
-
-vpns = {
|
8
|
-
- etrue_prod: "/vpns/vpn-711360",
|
9
|
-
- etrue_test: "/vpns/vpn-286952",
|
10
|
-
- vagrant_provider_test: "/vpns/vpn-3195669",
|
11
|
-
- jsmith_dev: "/vpns/vpn-8797011425",
|
12
|
-
-}
|
13
|
-
-
|
14
|
-
-base_urls = {
|
15
|
-
- prod: "https://cloud.skytap.com/",
|
16
|
-
- test: "https://test.skytap.com/",
|
17
|
-
- integ: "https://integ.skytap.com/",
|
18
|
-
- dev: "https://cloud.skytap.dev/",
|
19
|
-
-}
|
20
|
-
-
|
21
|
-
-settings = {
|
22
|
-
- etrue_prod: {
|
23
|
-
- username: "etrue",
|
24
|
-
- api_token: "fcb2620b72efddbc8239e25db9d812f510c7e166",
|
25
|
-
- base_url: base_urls[:prod],
|
26
|
-
- vpn_url: vpns[:etrue_prod],
|
27
|
-
- },
|
28
|
-
- etrue_test: {
|
29
|
-
- username: "etrue",
|
30
|
-
- api_token: "d41e7b2f98b63844512c0d62d0e5496949d35f57",
|
31
|
-
- base_url: base_urls[:test],
|
32
|
-
- vpn_url: vpns[:etrue_test],
|
33
|
-
- },
|
34
|
-
- vagrant_provider_admin: {
|
35
|
-
- username: "vagrant_provider_admin",
|
36
|
-
- api_token: "7c5718531a32eb90e92c804ce1f73da98be22cdf",
|
37
|
-
- base_url: base_urls[:test],
|
38
|
-
- vpn_url: vpns[:vagrant_provider_test],
|
39
|
-
- },
|
40
|
-
- jsmith_dev: {
|
41
|
-
- username: "jsmith",
|
42
|
-
- api_token: "754be5220955f35840498340606b4dfa89f7eb61",
|
43
|
-
- base_url: base_urls[:dev],
|
44
|
-
- vpn_url: vpns[:jsmith_dev],
|
45
|
-
- },
|
46
|
-
-}
|
47
|
-
-
|
48
|
-
-vms = {
|
49
|
-
- golden: {
|
50
|
-
- vm_url: "https://cloud.skytap.com/vms/6869434"
|
51
|
-
- },
|
52
|
-
- nick_for_bootcamp: {
|
53
|
-
- vm_url: "https://cloud.skytap.com/vms/7878190",
|
54
|
-
- },
|
55
|
-
- take1: {
|
56
|
-
- vm_url: "https://test.skytap.com/vms/6984688",
|
57
|
-
- username: "autoadmin",
|
58
|
-
- password: "autoadmin",
|
59
|
-
- },
|
60
|
-
- ubuntu1: {
|
61
|
-
- vm_url: "https://cloud.skytap.com/vms/7285844"
|
62
|
-
- },
|
63
|
-
- ubuntu2: {
|
64
|
-
- vm_url: "https://cloud.skytap.com/vms/7285846",
|
65
|
-
- username: "skytap",
|
66
|
-
- password: "CarpYe$$$"
|
67
|
-
- },
|
68
|
-
- ubuntu_with_vagrant: {vm_url: "https://cloud.skytap.com/vms/7397734"},
|
69
|
-
- us_east: {vm_url: "https://cloud.skytap.com/vms/6232386"},
|
70
|
-
- emea: {vm_url: "https://cloud.skytap.com/vms/4153172"},
|
71
|
-
- eng11490: {vm_url: "https://cloud.skytap.com/templates/696065"},
|
72
|
-
- no_disk: {vm_url: "https://cloud.skytap.com/vms/7500356"},
|
73
|
-
- public_template_no_sudoers: {
|
74
|
-
- vm_url: "https://cloud.skytap.com/vms/3157858",
|
75
|
-
- },
|
76
|
-
- windows_winrm_configured: {
|
77
|
-
- vm_url: "https://cloud.skytap.com/vms/7242468",
|
78
|
-
- username: "Administrator",
|
79
|
-
- password: "admin",
|
80
|
-
- communicator: :winrm,
|
81
|
-
- },
|
82
|
-
- vm_on_dev: {
|
83
|
-
- vm_url:"https://cloud.skytap.dev/vms/372"
|
84
|
-
- },
|
85
|
-
-}.tap do |ret|
|
86
|
-
- ret.each do |key, vm|
|
87
|
-
- vm[:username] ||= "skytap"
|
88
|
-
- vm[:password] ||= "ChangeMe!"
|
89
|
-
- vm[:communicator] ||= :ssh
|
90
|
-
- end
|
91
|
-
-end
|
92
|
-
-
|
93
|
-
-##################################
|
94
|
-
-settings_key = :etrue_prod
|
95
|
-
-vm1_key = :golden
|
96
|
-
-vm2_key = :windows_winrm_configured
|
97
|
-
-vm3_key = :ubuntu2
|
98
|
-
-#############################
|
99
|
-
-
|
100
|
-
+$script = <<SCRIPT
|
101
|
-
+ sudo apt-get update
|
102
|
-
+ sudo apt-get install -y apache2 lynx-cur
|
103
|
-
+ #sudo update-rc.d apache2 enable
|
104
|
-
+SCRIPT
|
105
|
-
|
106
|
-
Vagrant.configure(2) do |config|
|
107
|
-
config.vm.box = "skytap/empty"
|
108
|
-
config.vm.synced_folder ".", "/vagrant", disabled: true
|
109
|
-
|
110
|
-
config.vm.provider :skytap do |skytap, override|
|
111
|
-
- skytap.username = settings[settings_key][:username]
|
112
|
-
- skytap.api_token = settings[settings_key][:api_token]
|
113
|
-
- skytap.base_url = settings[settings_key][:base_url]
|
114
|
-
- skytap.vpn_url = settings[settings_key][:vpn_url]
|
115
|
-
+ skytap.username = "foo"
|
116
|
-
+ skytap.api_token = "bar"
|
117
|
-
+ skytap.vpn_url = "/vpns/vpn-711360"
|
118
|
-
end
|
119
|
-
|
120
|
-
config.vm.define "vm1" do |box|
|
121
|
-
- #box.vm.hostname = "vm1"
|
122
|
-
box.vm.provider :skytap do |box|
|
123
|
-
- box.vm_url = vms[vm1_key][:vm_url]
|
124
|
-
- #box.cpus = 1
|
125
|
-
+ box.vm_url = "/vms/6869434"
|
126
|
-
end
|
127
|
-
- box.ssh.username = vms[vm1_key][:username]
|
128
|
-
- box.ssh.password = vms[vm1_key][:password]
|
129
|
-
- box.vm.communicator = vms[vm1_key][:communicator]
|
130
|
-
- box.vm.synced_folder "vm1", "/synced", type: :nfs
|
131
|
-
- #box.vm.provision "shell", path: "provisioning/trivial.sh"
|
132
|
-
- box.vm.provision "shell", path: "provisioning/vagrant.sh"
|
133
|
-
-
|
134
|
-
- #box.vm.network :forwarded_port, guest: 80, host: 9000
|
135
|
-
- #box.vm.network :forwarded_port, guest: 21, host: 9001
|
136
|
-
+ box.ssh.username = "skytap"
|
137
|
-
+ box.ssh.password = "ChangeMe!"
|
138
|
-
+ box.vm.provision "shell", inline: $script
|
139
|
-
+ box.vm.network :forwarded_port, guest: 80, host: 8080
|
140
|
-
end
|
141
|
-
-
|
142
|
-
-# config.vm.define "vm2" do |box|
|
143
|
-
-# box.vm.hostname = "vm2"
|
144
|
-
-# box.vm.provider :skytap do |box|
|
145
|
-
-# box.vm_url = vms[vm2_key][:vm_url]
|
146
|
-
-# end
|
147
|
-
-# box.ssh.username = vms[vm2_key][:username]
|
148
|
-
-# box.ssh.password = vms[vm2_key][:password]
|
149
|
-
-# box.vm.communicator = vms[vm2_key][:communicator]
|
150
|
-
-# box.vm.synced_folder "vm2", "/synced", type: :nfs
|
151
|
-
-# end
|
152
|
-
-#
|
153
|
-
-# config.vm.define "vm3" do |box|
|
154
|
-
-# box.vm.hostname = "vm3"
|
155
|
-
-# box.vm.provider :skytap do |box|
|
156
|
-
-# box.vm_url = vms[vm3_key][:vm_url]
|
157
|
-
-# end
|
158
|
-
-# box.ssh.username = vms[vm3_key][:username]
|
159
|
-
-# box.ssh.password = vms[vm3_key][:password]
|
160
|
-
-# box.vm.communicator = vms[vm3_key][:communicator]
|
161
|
-
-# box.vm.synced_folder "vm3", "/synced", type: :nfs
|
162
|
-
-# box.vm.provision "shell", path: "provisioning/trivial.sh"
|
163
|
-
-# end
|
164
|
-
end
|
165
|
-
-
|
166
|
-
-#ubuntu.vm.synced_folder "vm1", "/home/skytap/app", type: :nfs, :mount_options => ['actimeo=1']
|
167
|
-
-
|
@@ -1,137 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent a50b0c324cbb08bc73192b68a07656b31adf3856
|
3
|
-
# Parent 3d17458551564a54815fa13ec888b3335b947f4a
|
4
|
-
this cannot work, vagrant-spec is totally black box
|
5
|
-
|
6
|
-
diff --git a/Vagrantfile b/Vagrantfile
|
7
|
-
--- a/Vagrantfile
|
8
|
-
+++ b/Vagrantfile
|
9
|
-
@@ -29,13 +29,14 @@
|
10
|
-
WINDOWS_WINRM_CONFIGURED = 'https://cloud.skytap.com/vms/7242468'
|
11
|
-
|
12
|
-
config.vm.define "vm1" do |ubuntu|
|
13
|
-
- ubuntu.vm.hostname = "vm1"
|
14
|
-
+ ubuntu.vm.hostname = "etruevm1"
|
15
|
-
ubuntu.vm.provider :skytap do |box|
|
16
|
-
box.vm_url = UBUNTU1#GENERIC_UBUNTU
|
17
|
-
#box.cpus = 1
|
18
|
-
#box.cpuspersocket = 1
|
19
|
-
#box.ram = 1024
|
20
|
-
#box.guestos = "ubuntu"
|
21
|
-
+ box.vpn_url = "https://cloud.skytap.com/vpns/vpn-711360"
|
22
|
-
end
|
23
|
-
ubuntu.vm.synced_folder "~/test1", "/synced", type: :nfs
|
24
|
-
ubuntu.vm.communicator = :ssh
|
25
|
-
diff --git a/spec/acceptance/provider/halt_spec.rb b/spec/acceptance/provider/halt_spec.rb
|
26
|
-
--- a/spec/acceptance/provider/halt_spec.rb
|
27
|
-
+++ b/spec/acceptance/provider/halt_spec.rb
|
28
|
-
@@ -1,3 +1,69 @@
|
29
|
-
shared_examples 'provider/halt' do |provider, options|
|
30
|
-
|
31
|
-
+
|
32
|
-
+ let(:net_http) {
|
33
|
-
+ double("Net::HTTP")
|
34
|
-
+ }
|
35
|
-
+
|
36
|
-
+ let(:client_class) {
|
37
|
-
+ double("VagrantPlugins::Skytap::API::CLIENT")
|
38
|
-
+ }
|
39
|
-
+
|
40
|
-
+ let(:api_client) do
|
41
|
-
+ double('api_client',
|
42
|
-
+ get: double('resp', body: 'hi')
|
43
|
-
+ )
|
44
|
-
+ end
|
45
|
-
+
|
46
|
-
+
|
47
|
-
+ if !options[:box]
|
48
|
-
+ raise ArgumentError,
|
49
|
-
+ "box option must be specified for provider: #{provider}"
|
50
|
-
+ end
|
51
|
-
+
|
52
|
-
+ include_context 'acceptance'
|
53
|
-
+
|
54
|
-
+ before do
|
55
|
-
+
|
56
|
-
+# debugger
|
57
|
-
+# stub_const("VagrantPlugins::Skytap::API::Client", client_class)
|
58
|
-
+#
|
59
|
-
+# allow(client_class).to receive(:get).
|
60
|
-
+# with("/configurations").
|
61
|
-
+# and_return(Net::HTTPOK)
|
62
|
-
+#
|
63
|
-
+# allow(client_class).to receive(:get).
|
64
|
-
+# and_raise('foo')
|
65
|
-
+## with("/configurations").
|
66
|
-
+# #and_return(Net::HTTPOK)
|
67
|
-
+#
|
68
|
-
+# stub_const("Net::HTTP", net_http)
|
69
|
-
+# allow(net_http).to receive(:new).
|
70
|
-
+# and_raise('foo')
|
71
|
-
+# #with("/configurations").
|
72
|
-
+
|
73
|
-
+
|
74
|
-
+ environment.skeleton('generic')
|
75
|
-
+ assert_execute('vagrant', 'box', 'add', 'skytap-dummy', options[:box])
|
76
|
-
+ assert_execute('vagrant', 'up', "--provider=#{provider}")
|
77
|
-
+ end
|
78
|
-
+
|
79
|
-
+ after do
|
80
|
-
+ assert_execute('vagrant', 'destroy', '--force')
|
81
|
-
+ end
|
82
|
-
+
|
83
|
-
+ it 'should halt the machine and bring it back up' do
|
84
|
-
+ status("Test: machine can be halted")
|
85
|
-
+ halt_result = execute("vagrant", "halt")
|
86
|
-
+ expect(halt_result).to exit_with(0)
|
87
|
-
+#
|
88
|
-
+# status("Test: machine can be brought up after halt")
|
89
|
-
+# up_result = execute("vagrant", "up")
|
90
|
-
+# expect(up_result).to exit_with(0)
|
91
|
-
+#
|
92
|
-
+# status("Test: machine is running after up")
|
93
|
-
+# echo_result = execute("vagrant", "ssh", "-c", "echo foo")
|
94
|
-
+# expect(echo_result).to exit_with(0)
|
95
|
-
+# expect(echo_result.stdout).to match(/foo\n$/)
|
96
|
-
+ end
|
97
|
-
end
|
98
|
-
diff --git a/spec/acceptance/skeletons/mock_api/Vagrantfile b/spec/acceptance/skeletons/mock_api/Vagrantfile
|
99
|
-
new file mode 100644
|
100
|
-
--- /dev/null
|
101
|
-
+++ b/spec/acceptance/skeletons/mock_api/Vagrantfile
|
102
|
-
@@ -0,0 +1,15 @@
|
103
|
-
+Vagrant.configure("2") do |config|
|
104
|
-
+ config.vm.box = "skytap-dummy"
|
105
|
-
+
|
106
|
-
+ config.vm.provider :skytap do |skytap, override|
|
107
|
-
+ skytap.username = "user"
|
108
|
-
+ skytap.api_token = "99999999"
|
109
|
-
+ skytap.base_url = "http://localhost/"
|
110
|
-
+ end
|
111
|
-
+
|
112
|
-
+ config.vm.define "vm1" do |ubuntu|
|
113
|
-
+ ubuntu.vm.provider :skytap do |box|
|
114
|
-
+ box.vm_url = "http://localhost/vms/1"
|
115
|
-
+ end
|
116
|
-
+ end
|
117
|
-
+end
|
118
|
-
diff --git a/spec/acceptance/skeletons/mock_api/skytap-dummy b/spec/acceptance/skeletons/mock_api/skytap-dummy
|
119
|
-
new file mode 100644
|
120
|
-
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f9eefb302ee552c8d3c6ad929f4946988d2857fd
|
121
|
-
GIT binary patch
|
122
|
-
literal 167
|
123
|
-
zc$|~(=3sc`<q^Wb{Pw&f*C7Le)`#n=yCyK7F!7B3VAi;7K~nTA4UdoS!nm8dcWEpA
|
124
|
-
zx&O@2fG7W);?HC1`>l`dJH1U&X=?GSnWdrogU%S~=d9#<+#?tswQ`Ecxm!lTn*!(a
|
125
|
-
zPoMF}BK&2Ik7Dc9y_IWo_uq-M3w-}aICx!JmBjDY3pp3x)0Xw${)Bz*{m=2!nHiA5
|
126
|
-
Qnkt6NmOI}uXfQAU04kYD3;+NC
|
127
|
-
|
128
|
-
diff --git a/spec/acceptance/skeletons/mock_api/skytap-dummy.box b/spec/acceptance/skeletons/mock_api/skytap-dummy.box
|
129
|
-
new file mode 100644
|
130
|
-
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f9eefb302ee552c8d3c6ad929f4946988d2857fd
|
131
|
-
GIT binary patch
|
132
|
-
literal 167
|
133
|
-
zc$|~(=3sc`<q^Wb{Pw&f*C7Le)`#n=yCyK7F!7B3VAi;7K~nTA4UdoS!nm8dcWEpA
|
134
|
-
zx&O@2fG7W);?HC1`>l`dJH1U&X=?GSnWdrogU%S~=d9#<+#?tswQ`Ecxm!lTn*!(a
|
135
|
-
zPoMF}BK&2Ik7Dc9y_IWo_uq-M3w-}aICx!JmBjDY3pp3x)0Xw${)Bz*{m=2!nHiA5
|
136
|
-
Qnkt6NmOI}uXfQAU04kYD3;+NC
|
137
|
-
|