mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
curl tests: fix tests during upgrade from older versions
This commit is contained in:
parent
28b83f5f95
commit
11aa602097
1 changed files with 8 additions and 2 deletions
10
lib/tests.sh
10
lib/tests.sh
|
@ -238,8 +238,14 @@ _VALIDATE_THAT_APP_CAN_BE_ACCESSED () {
|
||||||
|
|
||||||
log_small_title "Validating that the app $app_id_to_check can/can't be accessed with its URL..."
|
log_small_title "Validating that the app $app_id_to_check can/can't be accessed with its URL..."
|
||||||
|
|
||||||
|
if [ -e "$package_path/tests.toml" ]
|
||||||
python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); print(toml.dumps(t['default'].get('curl_tests', {})))" < $package_path/tests.toml > $TEST_CONTEXT/curl_tests.toml
|
then
|
||||||
|
local current_test_serie=$(jq -r '.test_serie' $testfile)
|
||||||
|
python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); print(toml.dumps(t['$current_test_serie'].get('curl_tests', {})))" < "$package_path/tests.toml" > $TEST_CONTEXT/curl_tests.toml
|
||||||
|
# Upgrade from older versions may still be in packaging v1 without a tests.toml
|
||||||
|
else
|
||||||
|
echo "" > $TEST_CONTEXT/curl_tests.toml
|
||||||
|
fi
|
||||||
|
|
||||||
DOMAIN="$DOMAIN" \
|
DOMAIN="$DOMAIN" \
|
||||||
SUBDOMAIN="$SUBDOMAIN" \
|
SUBDOMAIN="$SUBDOMAIN" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue