diff --git a/lib/lxc.sh b/lib/lxc.sh index 3f3283c..b3f2adf 100644 --- a/lib/lxc.sh +++ b/lib/lxc.sh @@ -66,7 +66,7 @@ LOAD_LXC_SNAPSHOT () { #================================================= -LXC_START () { +LXC_EXEC () { # Start the lxc container and execute the given command in it local cmd=$1 diff --git a/lib/tests.sh b/lib/tests.sh index 1ade2f1..e501460 100644 --- a/lib/tests.sh +++ b/lib/tests.sh @@ -13,7 +13,7 @@ _RUN_YUNOHOST_CMD() { lxc file push -p -r "$package_path" $LXC_NAME/app_folder --quiet # --output-as none is to disable the json-like output for some commands like backup create - LXC_START "yunohost --output-as none --debug $1" \ + LXC_EXEC "yunohost --output-as none --debug $1" \ | grep --line-buffered -v --extended-regexp '^[0-9]+\s+.{1,15}DEBUG' \ | grep --line-buffered -v 'processing action' @@ -39,7 +39,7 @@ _PREINSTALL () { # Copy the pre-install script into the container. lxc file push "$preinstall_script" "$LXC_NAME/preinstall.sh" # Then execute the script to execute the pre-install commands. - LXC_START "bash /preinstall.sh" + LXC_EXEC "bash /preinstall.sh" fi } @@ -439,7 +439,7 @@ TEST_PORT_ALREADY_USED () { lxc file push $TEST_CONTEXT/netcat.service $LXC_NAME/etc/systemd/system/netcat.service # Then start this service to block this port. - LXC_START "systemctl enable netcat & systemctl start netcat" + LXC_EXEC "systemctl enable netcat & systemctl start netcat" _PREINSTALL diff --git a/lib/tests_coordination.sh b/lib/tests_coordination.sh index aff885a..e71153d 100644 --- a/lib/tests_coordination.sh +++ b/lib/tests_coordination.sh @@ -267,13 +267,13 @@ run_all_tests() { LXC_RESET LXC_CREATE # Be sure that the container is running - LXC_START "true" + LXC_EXEC "true" # Print the version of YunoHost from the LXC container log_small_title "YunoHost versions" - LXC_START "yunohost --version" - LXC_START "yunohost --version --output-as json" | jq -r .yunohost.version >> $TEST_CONTEXT/ynh_version - LXC_START "yunohost --version --output-as json" | jq -r .yunohost.repo >> $TEST_CONTEXT/ynh_branch + LXC_EXEC "yunohost --version" + LXC_EXEC "yunohost --version --output-as json" | jq -r .yunohost.version >> $TEST_CONTEXT/ynh_version + LXC_EXEC "yunohost --version --output-as json" | jq -r .yunohost.repo >> $TEST_CONTEXT/ynh_branch echo $ARCH > $TEST_CONTEXT/architecture echo $app_id > $TEST_CONTEXT/app_id