From 3fa1b46c73f0dd002e63976f10fa0b5cc13ae359 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Thu, 12 Oct 2017 18:04:51 +0530 Subject: [PATCH] test: use symlinked app directory directly We used to copy the app content, to avoid the tests accidentally mutating it. But it makes it difficult to change the source code and having it reflected inside the VM. Also Yunohost copies the app files itself before executing scripts. So this should be more convenient and safe enough. --- test.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test.sh b/test.sh index b8fa766..d13f925 100755 --- a/test.sh +++ b/test.sh @@ -9,8 +9,7 @@ set -e # Configuration constants APP_NAME="mattermost" -TESTS_DIR="/home/vagrant/tests" -APP_DIR="$TESTS_DIR/app" +APP_DIR="/vagrant" DOMAIN="ynh-tests.local" VM_ROOT_PASSWORD="alpine" YUNOHOST_ADMIN_PASSWORD="alpine" @@ -111,15 +110,6 @@ function setup() { echo "--- Saving Vagrant snapshot ---" vagrant snapshot save yunohost-jessie-pristine fi - - # Copy the files inside the VM, rather than using the mounted - # files directly. - # This avoids tests screwing up our files if something goes wrong. - echo "--- Copying app content into the box ---" - if ! [ -d "$APP_DIR" ]; then - _vagrant_ssh "mkdir -p '$TESTS_DIR'" - _vagrant_ssh "cp -R '/vagrant' '$APP_DIR'" - fi } function test_simple_install() {