From 0f85ddbcffff2b2bccc081d26d061b4601859720 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 22:22:46 +0200 Subject: [PATCH] =?UTF-8?q?friskies=C2=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_helpers.v2.1.d/ynhtest_config.sh | 2 +- tests/test_helpers.v2.1.d/ynhtest_setup_source.sh | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/test_helpers.v2.1.d/ynhtest_config.sh b/tests/test_helpers.v2.1.d/ynhtest_config.sh index ac7c2f853..5448d41c3 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_config.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_config.sh @@ -130,7 +130,7 @@ EOF ! _read_py "$file" "NONEXISTENT" test "$(ynh_read_var_in_file --file="$file" --key="NONEXISTENT")" == "YNH_NULL" - ! ynh_write_var_in_file --file="$file" --key="ENABLE" -value="foobar" + ! ynh_write_var_in_file --file="$file" --key="ENABLE" --value="foobar" ! _read_py "$file" "ENABLE" test "$(ynh_read_var_in_file --file="$file" --key="ENABLE")" == "YNH_NULL" diff --git a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh index 0b9d2e665..a8e0a5947 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh @@ -1,17 +1,17 @@ _make_dummy_manifest() { if [ ! -e $HTTPSERVER_DIR/dummy.tar.gz ] then - pushd "$HTTPSERVER_DIR" + pushd "$HTTPSERVER_DIR" >/dev/null mkdir dummy - pushd dummy + pushd dummy >/dev/null echo "Lorem Ipsum" > index.html echo '{"foo": "bar"}' > conf.json mkdir assets echo '.some.css { }' > assets/main.css echo 'var some="js";' > assets/main.js - popd - tar -czf dummy.tar.gz dummy - popd + popd >/dev/null + tar -czf dummy.tar.gz dummy >/dev/null + popd >/dev/null fi cat << EOF @@ -38,16 +38,17 @@ ynhtest_setup_source_nominal() { test -e "$install_dir" test -e "$install_dir/index.html" + test -e "$install_dir/assets" ls -ld "$install_dir" | grep -q "drwxr-x--- . $app www-data" ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app www-data" + ls -ld "$install_dir/assets" | grep -q "drwxr-x--- . $app www-data" } ynhtest_setup_source_no_group_in_manifest() { install_dir="$(mktemp -d -p $VAR_WWW)" _make_dummy_manifest > ../manifest.toml sed '/www-data/d' -i ../manifest.toml - cat ../manifest.toml # debug ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" @@ -56,6 +57,7 @@ ynhtest_setup_source_no_group_in_manifest() { ls -ld "$install_dir" | grep -q "drwxr-x--- . $app $app" ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app $app" + ls -ld "$install_dir/assets" | grep -q "drwxr-x--- . $app $app" }