provision.sh: don't start local worker and Weldr with TLS auth
Do not start local worker (mask the unit) and Weldr API socket when provisioning the SUT with TLS client cert authentication method. This method is used only in the Service scenario, therefore starting these units / sockets was not reflecting the intended deployment. Modify `api.sh` to not rely on local worker. Modify `base_tests.sh` to provision SUT with TLS for `osbuild-auth-tests`, while provisioning SUT with no authentication method for the rest of test cases.
This commit is contained in:
parent
a4b0efb278
commit
45850639a0
6 changed files with 20 additions and 23 deletions
|
|
@ -431,9 +431,9 @@ waitForState "failure"
|
|||
# crashed/stopped/killed worker should result in a failed state
|
||||
sendCompose "$REQUEST_FILE"
|
||||
waitForState "building"
|
||||
sudo systemctl stop "osbuild-worker@*"
|
||||
sudo systemctl stop "osbuild-remote-worker@*"
|
||||
waitForState "failure"
|
||||
sudo systemctl start "osbuild-worker@1"
|
||||
sudo systemctl start "osbuild-remote-worker@localhost:8700.service"
|
||||
|
||||
# full integration case
|
||||
INIT_COMPOSES="$(collectMetrics)"
|
||||
|
|
@ -565,7 +565,7 @@ TOKEN="$(curl --request POST \
|
|||
http://localhost:443/api/image-builder-composer/v2/composes/"$COMPOSE_ID")" = "401" ]
|
||||
|
||||
|
||||
sudo systemctl start osbuild-remote-worker@localhost:8700.service
|
||||
sudo systemctl restart osbuild-remote-worker@localhost:8700.service
|
||||
sudo systemctl is-active --quiet osbuild-remote-worker@localhost:8700.service
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ domain="${CI_REGISTRY}"
|
|||
path_prefix="${CI_PROJECT_PATH}"
|
||||
EOF
|
||||
|
||||
sudo systemctl restart "osbuild-worker@1"
|
||||
sudo systemctl restart "osbuild-remote-worker@localhost:8700"
|
||||
}
|
||||
|
||||
function createReqFile() {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ region = "${MINIO_REGION}"
|
|||
bucket = "${MINIO_BUCKET}"
|
||||
EOF
|
||||
|
||||
sudo systemctl restart "osbuild-worker@1"
|
||||
sudo systemctl restart "osbuild-remote-worker@localhost:8700"
|
||||
}
|
||||
|
||||
# Unset AWS_REGION, region == "" in the request the worker will look for the generic s3
|
||||
|
|
|
|||
|
|
@ -13,10 +13,13 @@ LOGS_DIRECTORY=$(mktemp --directory --tmpdir=/tmp/logs)
|
|||
PASSED_TESTS=()
|
||||
FAILED_TESTS=()
|
||||
|
||||
TEST_CASES=(
|
||||
TEST_CASES_ON_PREM=(
|
||||
"osbuild-weldr-tests"
|
||||
"osbuild-dnf-json-tests"
|
||||
"osbuild-composer-cli-tests"
|
||||
)
|
||||
|
||||
TEST_CASES_SERVICE=(
|
||||
"osbuild-auth-tests"
|
||||
)
|
||||
|
||||
|
|
@ -51,7 +54,14 @@ run_test_case () {
|
|||
cd $WORKING_DIRECTORY
|
||||
|
||||
# Run each test case.
|
||||
for TEST_CASE in "${TEST_CASES[@]}"; do
|
||||
for TEST_CASE in "${TEST_CASES_ON_PREM[@]}"; do
|
||||
run_test_case ${TESTS_PATH}/"$TEST_CASE"
|
||||
done
|
||||
|
||||
/usr/libexec/osbuild-composer-test/provision.sh tls
|
||||
|
||||
# Run each test case.
|
||||
for TEST_CASE in "${TEST_CASES_SERVICE[@]}"; do
|
||||
run_test_case ${TESTS_PATH}/"$TEST_CASE"
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue