From 4c9bae517637cd0b4583143a868defd0703be2b9 Mon Sep 17 00:00:00 2001 From: downtownallday Date: Fri, 27 Nov 2020 16:51:10 -0500 Subject: [PATCH] Create a default "pre-commit" set of virtual machines --- tests/vagrant/Vagrantfile | 8 +++++--- tests/vagrant/parallel.sh | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/vagrant/Vagrantfile b/tests/vagrant/Vagrantfile index cf04d206..952377d6 100644 --- a/tests/vagrant/Vagrantfile +++ b/tests/vagrant/Vagrantfile @@ -7,8 +7,9 @@ Vagrant.configure("2") do |config| # fresh install with encryption-at-rest - config.vm.define "remote-nextcloud-docker-ehdd" do |m1| - m1.vm.provision :shell, :inline => <<-SH + if ENV['tests']=='all' + config.vm.define "remote-nextcloud-docker-ehdd" do |m1| + m1.vm.provision :shell, :inline => <<-SH cd /mailinabox source tests/vagrant/globals.sh || exit 1 export PRIMARY_HOSTNAME=qa1.abc.com @@ -18,6 +19,7 @@ echo -n "boo" >$EHDD_KEYFILE tests/system-setup/remote-nextcloud-docker.sh || exit 1 tests/runner.sh ehdd default remote-nextcloud || exit 2 SH + end end # remote-nextcloud-docker w/basic data @@ -57,7 +59,7 @@ SH # tests/system-setup/setup-default.sh, which pre-assign a value to # most variables. - if ENV['tests']=='all' + if ENV['tests']=='all' or ENV['tests']=='pre-commit' config.vm.define "unsetvars" do |m1| m1.vm.hostname = "mailinabox.lan" m1.vm.network "private_network", ip: "192.168.50.4" diff --git a/tests/vagrant/parallel.sh b/tests/vagrant/parallel.sh index 530381a4..719b8f2e 100755 --- a/tests/vagrant/parallel.sh +++ b/tests/vagrant/parallel.sh @@ -11,6 +11,10 @@ . "$(dirname "$0")/../lib/color-output.sh" . "$(dirname "$0")/../lib/misc.sh" +if [ -z "$tests" ]; then + export tests="pre-commit" +fi + OUTPUT_DIR=out #rm -rf "$OUTPUT_DIR"