diff --git a/CondCore/Utilities/test/BuildFile.xml b/CondCore/Utilities/test/BuildFile.xml index 965967fb933c2..865923f343976 100644 --- a/CondCore/Utilities/test/BuildFile.xml +++ b/CondCore/Utilities/test/BuildFile.xml @@ -13,3 +13,7 @@ + + + + diff --git a/CondCore/Utilities/test/test_uploadConditions.sh b/CondCore/Utilities/test/test_uploadConditions.sh new file mode 100755 index 0000000000000..81349b58f6c64 --- /dev/null +++ b/CondCore/Utilities/test/test_uploadConditions.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +check_for_success() { + "${@}" && echo -e "\n ---> Passed test of '${@}'\n\n" || exit 1 +} + +check_for_failure() { + "${@}" && exit 1 || echo -e "\n ---> Passed test of '${@}'\n\n" +} + +######################################## +# Test help function +######################################## +check_for_success uploadConditions.py --help + +######################################## +# Test wizard +######################################## +if test -f "BasicPayload_v0.txt"; then + rm -f BasicPayload_v0.txt +fi +cat <> BasicPayload_v0.txt +{ + "destinationDatabase": "ANYTHIGHEREWILLDO", + "destinationTags": { + "BasicPayload_v0": {} + }, + "inputTag": "BasicPayload_v0", + "since": null, + "userText": "test wizard" +} +EOF + +echo "content of the directory is:" `ls -lh . | grep db` +check_for_failure uploadConditions.py BasicPayload_v0.db