mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Migrate acceptance tests to rspec (#1513)
Move existing tests executed with the help of bats to use rspec directly combined with tags to filter them out from being executed by default. This allows for more complex assertions as well as easier debug as the code supports use of setting 'VAGRANT_SPEC_SKIP_CLEANUP' to prevent the tests from removing the temporary directory created for home and work directories. Extend a number of classes from vagrant-spec to override default behaviour to allow passing of additional environment variables for packaging tests, as well as supporting the skip cleanup. Given the use of after to perform the cleanup, need to vendor the vagrant-spec acceptance context in order to modify it easily.
This commit is contained in:
32
spec/acceptance/additional_storage_spec.rb
Normal file
32
spec/acceptance/additional_storage_spec.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'additional storage configured', acceptance: true do
|
||||
include_context 'libvirt_acceptance'
|
||||
|
||||
before do
|
||||
environment.skeleton('additional_storage')
|
||||
end
|
||||
|
||||
after do
|
||||
assert_execute('vagrant', 'destroy', '--force')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
result = environment.execute('vagrant', 'up')
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
status('Test: additional storage configured')
|
||||
expect(result.stdout).to match(/\(vda\).*work_default.img/)
|
||||
expect(result.stdout).to match(/\(vdb\).*work_default-vdb\.qcow2/)
|
||||
|
||||
status('Test: reload handles additional storage correctly')
|
||||
result = environment.execute('vagrant', 'reload')
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
status('Test: additional storage reported correctly')
|
||||
expect(result.stdout).to match(/\(vdb\).*work_default-vdb\.qcow2/)
|
||||
end
|
||||
end
|
||||
90
spec/acceptance/package_domain_spec.rb
Normal file
90
spec/acceptance/package_domain_spec.rb
Normal file
@@ -0,0 +1,90 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'package domain', acceptance: true do
|
||||
include_context 'libvirt_acceptance'
|
||||
|
||||
before(:all) do
|
||||
expect(Vagrant::Util::Which.which('virt-sysprep')).to be_truthy,
|
||||
'packaging tests require virt-sysprep, please install'
|
||||
expect(Vagrant::Util::Which.which('virt-sparsify')).to be_truthy,
|
||||
'packaging tests require virt-sparsify, please install'
|
||||
|
||||
result = (File.exist?('C:\\') ? `dir /-C #{Dir.tmpdir}` : `df #{Dir.tmpdir}`).split("\n").last
|
||||
expect(result.split[3].to_i).to be > 6 * 1024 * 1024,
|
||||
"packaging tests require more than 6GiB of space under #{Dir.tmpdir}"
|
||||
end
|
||||
|
||||
after(:each) do
|
||||
assert_execute('vagrant', 'destroy', '--force')
|
||||
end
|
||||
|
||||
let(:testbox_envvars) { { VAGRANT_VAGRANTFILE: 'Vagrantfile.testbox' } }
|
||||
|
||||
context 'simple' do
|
||||
before do
|
||||
environment.skeleton('package_simple')
|
||||
end
|
||||
|
||||
after do
|
||||
result = environment.execute('vagrant', 'destroy', '--force', extra_env: testbox_envvars)
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
assert_execute('vagrant', 'box', 'remove', '--force', 'test-package-simple-domain')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
expect(environment.execute('vagrant', 'up')).to exit_with(0)
|
||||
|
||||
status('Test: package machine successfully')
|
||||
expect(environment.execute('vagrant', 'package')).to exit_with(0)
|
||||
|
||||
status('Test: add packaged box')
|
||||
expect(environment.execute(
|
||||
'vagrant', 'box', 'add', '--force', '--name', 'test-package-simple-domain', 'package.box'
|
||||
)).to exit_with(0)
|
||||
|
||||
status('Test: machine from packaged box is created successfully')
|
||||
result = environment.execute('vagrant', 'up', extra_env: testbox_envvars)
|
||||
expect(result).to exit_with(0)
|
||||
expect(result.stdout).to match(/test-package-complex-domain/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'complex' do
|
||||
before do
|
||||
environment.skeleton('package_complex')
|
||||
extra_env.merge!(
|
||||
{
|
||||
VAGRANT_LIBVIRT_VIRT_SYSPREP_OPERATIONS: 'defaults,-ssh-userdir,customize',
|
||||
VAGRANT_LIBVIRT_VIRT_SYSPREP_OPTIONS: '--run $(pwd)/scripts/sysprep.sh',
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
after do
|
||||
expect(environment.execute('vagrant', 'destroy', '--force', extra_env: testbox_envvars)).to exit_with(0)
|
||||
assert_execute('vagrant', 'box', 'remove', '--force', 'test-package-complex-domain')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
expect(environment.execute('vagrant', 'up')).to exit_with(0)
|
||||
|
||||
status('Test: package machine successfully')
|
||||
expect(environment.execute('vagrant', 'package')).to exit_with(0)
|
||||
|
||||
status('Test: add packaged box')
|
||||
expect(environment.execute(
|
||||
'vagrant', 'box', 'add', '--force', '--name', 'test-package-complex-domain', 'package.box'
|
||||
)).to exit_with(0)
|
||||
|
||||
status('Test: machine from packaged box is created successfully')
|
||||
result = environment.execute('vagrant', 'up', extra_env: testbox_envvars)
|
||||
expect(result).to exit_with(0)
|
||||
expect(result.stdout).to match(/test-package-complex-domain/)
|
||||
end
|
||||
end
|
||||
end
|
||||
54
spec/acceptance/provider_settings_spec.rb
Normal file
54
spec/acceptance/provider_settings_spec.rb
Normal file
@@ -0,0 +1,54 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'provider settings', acceptance: true do
|
||||
include_context 'libvirt_acceptance'
|
||||
|
||||
after do
|
||||
assert_execute('vagrant', 'destroy', '--force')
|
||||
end
|
||||
|
||||
context 'with defaults' do
|
||||
before do
|
||||
environment.skeleton('default_settings')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
result = environment.execute('vagrant', 'up')
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
status('Test: CPU matches default')
|
||||
expect(result.stdout).to match(/Cpus:\s+1$/)
|
||||
|
||||
status('Test: memory matches default')
|
||||
expect(result.stdout).to match(/Memory:\s+512M/)
|
||||
|
||||
status('Test: default prefix is used')
|
||||
expect(result.stdout).to match(/Name:\s+work_default$/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with modified config' do
|
||||
before do
|
||||
environment.skeleton('adjusted_settings')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
result = environment.execute('vagrant', 'up')
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
status('Test: CPUs are changed')
|
||||
expect(result.stdout).to match(/Cpus:\s+2$/)
|
||||
|
||||
status('Test: memory is changed')
|
||||
expect(result.stdout).to match(/Memory:\s+1000M$/)
|
||||
|
||||
status('Test: default prefix is changed')
|
||||
expect(result.stdout).to match(/Name:\s+changed_default_prefixdefault$/)
|
||||
expect(result.stdout).to match(/\(vda\).*changed_default_prefixdefault\.img/)
|
||||
end
|
||||
end
|
||||
end
|
||||
31
spec/acceptance/simple_vm_provision_via_shell_spec.rb
Normal file
31
spec/acceptance/simple_vm_provision_via_shell_spec.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'simple vm provision via shell', acceptance: true do
|
||||
include_context 'libvirt_acceptance'
|
||||
|
||||
before do
|
||||
environment.skeleton('simple_vm_provision')
|
||||
end
|
||||
|
||||
after do
|
||||
assert_execute('vagrant', 'destroy', '--force')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
result = environment.execute('vagrant', 'up')
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
status('Test: provision script executed')
|
||||
expect(result.stdout).to match(/Hello, World/)
|
||||
|
||||
status('Test: reload')
|
||||
result = environment.execute('vagrant', 'reload')
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
status('Test: provision checked if already executed')
|
||||
expect(result.stdout).to match(/Machine already provisioned/)
|
||||
end
|
||||
end
|
||||
41
spec/acceptance/snapshots_spec.rb
Normal file
41
spec/acceptance/snapshots_spec.rb
Normal file
@@ -0,0 +1,41 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'snapshots', acceptance: true do
|
||||
include_context 'libvirt_acceptance'
|
||||
|
||||
after(:each) do
|
||||
assert_execute('vagrant', 'destroy', '--force')
|
||||
end
|
||||
|
||||
before do
|
||||
environment.skeleton('snapshots')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
expect(environment.execute('vagrant', 'up')).to exit_with(0)
|
||||
|
||||
status('Test: add test file')
|
||||
expect(environment.execute('vagrant', 'ssh', '--', '-t', 'touch a.txt')).to exit_with(0)
|
||||
|
||||
status('Test: create snapshot')
|
||||
expect(environment.execute('vagrant', 'snapshot', 'save', 'default', 'test')).to exit_with(0)
|
||||
|
||||
status('Test: modify files')
|
||||
expect(environment.execute('vagrant', 'ssh', '--', '-t', 'rm a.txt')).to exit_with(0)
|
||||
expect(environment.execute('vagrant', 'ssh', '--', '-t', 'ls a.txt')).to exit_with(1)
|
||||
expect(environment.execute('vagrant', 'ssh', '--', '-t', 'touch b.txt')).to exit_with(0)
|
||||
|
||||
status('Test: restore snapshot')
|
||||
expect(environment.execute('vagrant', 'snapshot', 'restore', 'test')).to exit_with(0)
|
||||
|
||||
status('Test: files are as expected')
|
||||
expect(environment.execute('vagrant', 'ssh', '--', '-t', 'ls a.txt')).to exit_with(0)
|
||||
expect(environment.execute('vagrant', 'ssh', '--', '-t', 'ls b.txt')).to exit_with(1)
|
||||
|
||||
status('Test: snapshot removal works')
|
||||
expect(environment.execute('vagrant', 'snapshot', 'delete', 'test')).to exit_with(0)
|
||||
end
|
||||
end
|
||||
15
spec/acceptance/support-skeletons/additional_storage/Vagrantfile
vendored
Normal file
15
spec/acceptance/support-skeletons/additional_storage/Vagrantfile
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "infernix/tinycore"
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.ssh.insert_key = false # needed for testing halt as inserted key is persisted
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.storage :file, :size => '1G'
|
||||
end
|
||||
end
|
||||
15
spec/acceptance/support-skeletons/adjusted_settings/Vagrantfile
vendored
Normal file
15
spec/acceptance/support-skeletons/adjusted_settings/Vagrantfile
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "infernix/tinycore"
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpu = 2
|
||||
libvirt.memory = 1000
|
||||
libvirt.default_prefix = "changed_default_prefix"
|
||||
end
|
||||
end
|
||||
10
spec/acceptance/support-skeletons/default_settings/Vagrantfile
vendored
Normal file
10
spec/acceptance/support-skeletons/default_settings/Vagrantfile
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "infernix/tinycore"
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
end
|
||||
20
spec/acceptance/support-skeletons/package_complex/Vagrantfile
vendored
Normal file
20
spec/acceptance/support-skeletons/package_complex/Vagrantfile
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/debian10"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.driver = "qemu"
|
||||
libvirt.cpus = 2
|
||||
libvirt.memory = 2048
|
||||
end
|
||||
|
||||
# note by default packaging the resulting machine will bundle the generated
|
||||
# ssh key with the resulting box, to disable this behaviour need to
|
||||
# uncomment the following line.
|
||||
#config.ssh.insert_key = false
|
||||
end
|
||||
@@ -0,0 +1,14 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "test-package-complex-domain"
|
||||
config.vm.define 'package-complex'
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.driver = "qemu"
|
||||
libvirt.cpus = 2
|
||||
libvirt.memory = 2048
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
# consider purging any packages you don't need here
|
||||
|
||||
echo "autoremoving packages and cleaning apt data"
|
||||
apt-get -y autoremove;
|
||||
apt-get -y clean;
|
||||
|
||||
# repeat what machine-ids does in sysprep as this script needs to run via customize
|
||||
# which has a bug resulting in the machine-ids being regenerated
|
||||
|
||||
if [ -f /etc/machine-id ]
|
||||
then
|
||||
truncate --size=0 /etc/machine-id
|
||||
fi
|
||||
|
||||
if [ -f /var/lib/dbus/machine-id ]
|
||||
then
|
||||
truncate --size=0 /run/machine-id
|
||||
fi
|
||||
|
||||
echo "remove /var/cache"
|
||||
find /var/cache -type f -exec rm -rf {} \;
|
||||
|
||||
echo "force a new random seed to be generated"
|
||||
rm -f /var/lib/systemd/random-seed
|
||||
|
||||
# for debian based systems ensure host keys regenerated on boot
|
||||
if [ -e /usr/sbin/dpkg-reconfigure ]
|
||||
then
|
||||
printf "@reboot root command bash -c 'export PATH=$PATH:/usr/sbin ; export DEBIAN_FRONTEND=noninteractive ; export DEBCONF_NONINTERACTIVE_SEEN=true ; /usr/sbin/dpkg-reconfigure openssh-server &>/dev/null ; /bin/systemctl restart ssh.service ; rm --force /etc/cron.d/keys'\n" > /etc/cron.d/keys
|
||||
fi
|
||||
11
spec/acceptance/support-skeletons/package_simple/Vagrantfile
vendored
Normal file
11
spec/acceptance/support-skeletons/package_simple/Vagrantfile
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "infernix/tinycore"
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.ssh.insert_key = false
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "test-package-simple-domain"
|
||||
config.vm.define 'package-simple'
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.ssh.insert_key = false
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
end
|
||||
14
spec/acceptance/support-skeletons/qemu_agent/Vagrantfile
vendored
Normal file
14
spec/acceptance/support-skeletons/qemu_agent/Vagrantfile
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/debian10"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
config.vm.network "private_network", type: "dhcp"
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.qemu_use_agent = true
|
||||
libvirt.mgmt_attach = false
|
||||
end
|
||||
end
|
||||
12
spec/acceptance/support-skeletons/simple_vm_provision/Vagrantfile
vendored
Normal file
12
spec/acceptance/support-skeletons/simple_vm_provision/Vagrantfile
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "infernix/tinycore"
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.ssh.insert_key = false
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
config.vm.provision "shell", inline: "echo Hello, World", privileged: false
|
||||
end
|
||||
13
spec/acceptance/support-skeletons/snapshots/Vagrantfile
vendored
Normal file
13
spec/acceptance/support-skeletons/snapshots/Vagrantfile
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "infernix/tinycore"
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.cpus = 2
|
||||
end
|
||||
end
|
||||
12
spec/acceptance/support-skeletons/two_disks/Vagrantfile
vendored
Normal file
12
spec/acceptance/support-skeletons/two_disks/Vagrantfile
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "infernix/tinycore-two-disks"
|
||||
config.vm.box_version = "0.0.2"
|
||||
config.ssh.shell = "/bin/sh"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
end
|
||||
29
spec/acceptance/two_disks_spec.rb
Normal file
29
spec/acceptance/two_disks_spec.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'handle two disk machine', acceptance: true do
|
||||
include_context 'libvirt_acceptance'
|
||||
|
||||
after do
|
||||
assert_execute('vagrant', 'destroy', '--force')
|
||||
end
|
||||
|
||||
before do
|
||||
environment.skeleton('two_disks')
|
||||
environment.execute(File.expand_path('../../tools/create_box_with_two_disks.sh', __dir__),
|
||||
environment.homedir.to_s, 'vagrant')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
result = environment.execute('vagrant', 'up')
|
||||
expect(result).to exit_with(0)
|
||||
|
||||
status('Test: disk one referenced')
|
||||
expect(result.stdout).to match(/Image\(vda\):.*work_default.img, virtio, 2G/)
|
||||
|
||||
status('Test: disk two referenced')
|
||||
expect(result.stdout).to match(/Image\(vdb\):.*work_default_1.img, virtio, 10G/)
|
||||
end
|
||||
end
|
||||
34
spec/acceptance/use_qemu_agent_for_connectivity_spec.rb
Normal file
34
spec/acceptance/use_qemu_agent_for_connectivity_spec.rb
Normal file
@@ -0,0 +1,34 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'use qemu agent to determine machine private address', acceptance: true do
|
||||
include_context 'libvirt_acceptance'
|
||||
|
||||
before do
|
||||
environment.skeleton('qemu_agent')
|
||||
end
|
||||
|
||||
after do
|
||||
assert_execute('vagrant', 'destroy', '--force')
|
||||
end
|
||||
|
||||
it 'should succeed' do
|
||||
status('Test: machine is created successfully')
|
||||
expect(environment.execute('vagrant', 'up')).to exit_with(0)
|
||||
|
||||
# extract SSH IP address emitted as it should be the private network since
|
||||
# the mgmt network has not been attached
|
||||
hostname = result.stdout.each_line.find { |line| line.include?('SSH address:') }
|
||||
expect(hostname).to_not be_nil
|
||||
ip_address = hostname.strip.split.last.split(':').first
|
||||
# default private network for vagrant-libvirt unless explicitly configured
|
||||
expect(IPAddr.new('172.28.128.0/255.255.255.0')).to include(IPAddr.new(ip_address))
|
||||
|
||||
# ssh'ing successfully means that the private network is accessible
|
||||
status('Test: machine private network is accessible')
|
||||
result = environment.execute('vagrant', 'ssh', '-c', 'echo "hello, world"')
|
||||
expect(result).to exit_with(0)
|
||||
expect(result.stdout).to match(/hello, world/)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user