workers: Backwards compatible api.openshift.com spec compliance

The main changes are:
- Kind, Href, Id fields for every object returned
- Attach operationIds to each request, return it for errors
- Errors are predefined and queryable
This commit is contained in:
sanne 2021-08-31 11:47:27 +02:00 committed by Tom Gundersen
parent 5e206322a2
commit 2f328b0e97
14 changed files with 816 additions and 209 deletions

View file

@ -30,7 +30,7 @@ run_test_case () {
echo "🏃🏻 Running test: ${TEST_NAME}"
test_divider
if sudo "${1}" -test.v | tee "${LOGS_DIRECTORY}"/"${TEST_NAME}".log; then
if sudo -E "${1}" -test.v | tee "${LOGS_DIRECTORY}"/"${TEST_NAME}".log; then
PASSED_TESTS+=("$TEST_NAME")
else
FAILED_TESTS+=("$TEST_NAME")
@ -44,6 +44,14 @@ run_test_case () {
# Provision the software under test.
/usr/libexec/osbuild-composer-test/provision.sh
ARCH=$(uname -m)
# Only run this on x86 and rhel8 GA; since the container is based on the ubi
# container, and we use the weldr api
if [ "$ARCH" = "x86_64" ] && [ "$ID" = rhel ] && sudo subscription-manager status; then
# Always run this one last as it force-installs an older worker
TEST_CASES+=("regression-old-worker-new-composer.sh")
fi
# Run test cases common for all distros.
for TEST_CASE in "${TEST_CASES[@]}"; do
run_test_case ${TESTS_PATH}/"$TEST_CASE"