diff --git a/tests/system-setup/setup-funcs.sh b/tests/system-setup/setup-funcs.sh index 07821a29..ddc3aa74 100755 --- a/tests/system-setup/setup-funcs.sh +++ b/tests/system-setup/setup-funcs.sh @@ -146,14 +146,6 @@ init_miab_testing() { rc=1 fi - if array_contains "--qa-ca" "$@"; then - echo "Copy certificate authority" - if ! cp tests/assets/ssl/ca_*.pem $STORAGE_ROOT/ssl; then - echo "Copy failed ($?)" - rc=1 - fi - fi - # create miab_ldap.conf to specify what the Nextcloud LDAP service # account password will be to avoid a random one created by start.sh if [ ! -z "$LDAP_NEXTCLOUD_PASSWORD" ]; then @@ -169,6 +161,35 @@ init_miab_testing() { fi fi + # process command line args + while [ $# -gt 0 ]; do + case "$1" in + --qa-ca ) + echo "Copy certificate authority" + shift + if ! cp tests/assets/ssl/ca_*.pem $STORAGE_ROOT/ssl; then + echo "Copy failed ($?)" + rc=1 + fi + ;; + + --enable-mod=* ) + local mod="$(awk -F= '{print $2}' <<<"$1")" + shift + echo "Enabling local mod '$mod'" + if ! enable_miab_mod "$mod"; then + echo "Enabling mod '$mod' failed" + rc=1 + fi + ;; + + * ) + # ignore unknown option - may be interpreted elsewhere + shift + ;; + esac + done + # now that we've copied our files, unmount STORAGE_ROOT if # encryption-at-rest was enabled ehdd/umount.sh diff --git a/tests/vagrant/vanilla/Vagrantfile b/tests/vagrant/vanilla/Vagrantfile index 2dd67350..528196ab 100644 --- a/tests/vagrant/vanilla/Vagrantfile +++ b/tests/vagrant/vanilla/Vagrantfile @@ -10,10 +10,23 @@ Vagrant.configure("2") do |config| config.vm.define "vanilla" do |m1| m1.vm.provision :shell, :inline => <<-SH +cat >/tmp/provision.sh <