diff --git a/integration-tests/scripts/post-activation-keys.sh b/integration-tests/scripts/post-activation-keys.sh new file mode 100755 index 000000000..da8db37d4 --- /dev/null +++ b/integration-tests/scripts/post-activation-keys.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +USERNAME=duey +PASSWORD=password +ORG=donaldduck + +curl -k --request POST --user ${USERNAME}:${PASSWORD} \ + --data '{"name":"act-key-01"}' \ + --header 'accept: application/json' \ + --header 'content-type: application/json' \ + https://localhost:8443/candlepin/owners/${ORG}/activation_keys + + +curl -k --request POST --user ${USERNAME}:${PASSWORD} \ + --data '{"name":"act-key-02"}' \ + --header 'accept: application/json' \ + --header 'content-type: application/json' \ + https://localhost:8443/candlepin/owners/${ORG}/activation_keys diff --git a/integration-tests/scripts/post-environments.sh b/integration-tests/scripts/post-environments.sh new file mode 100755 index 000000000..2bbcae428 --- /dev/null +++ b/integration-tests/scripts/post-environments.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +USERNAME=admin +PASSWORD=admin +ORG=donaldduck + +curl -k --request POST --user ${USERNAME}:${PASSWORD} \ + --data '{"id": "env-id-01", "name": "env-name-01", "description": "Testing environment num. 1"}' \ + --header 'accept: application/json' \ + --header 'content-type: application/json' \ + https://localhost:8443/candlepin/owners/${ORG}/environments + +curl -k --request POST --user ${USERNAME}:${PASSWORD} \ + --data '{"id": "env-id-02", "name": "env-name-02", "description": "Testing environment num. 2"}' \ + --header 'accept: application/json' \ + --header 'content-type: application/json' \ + https://localhost:8443/candlepin/owners/${ORG}/environments + diff --git a/integration-tests/scripts/run-local-candlepin.sh b/integration-tests/scripts/run-local-candlepin.sh new file mode 100755 index 000000000..411310a52 --- /dev/null +++ b/integration-tests/scripts/run-local-candlepin.sh @@ -0,0 +1,2 @@ +#!/bin/bash +podman run -d --name candlepin -p 8080:8080 -p 8443:8443 --hostname candlepin.local ghcr.io/ptoscano/candlepin-unofficial:latest diff --git a/systemtest/tests/integration/test.sh b/systemtest/tests/integration/test.sh index bdfa64eb9..5a597f97f 100755 --- a/systemtest/tests/integration/test.sh +++ b/systemtest/tests/integration/test.sh @@ -39,10 +39,11 @@ EOF # run local candlepin for testing purpose -podman run -d --name candlepin -p 8080:8080 -p 8443:8443 --hostname candlepin.local ghcr.io/ptoscano/candlepin-unofficial:latest +./integration-tests/scripts/run-local-candlepin.sh # create testing data in local candlepin -./extend-test-data.sh +./integration-tests/scripts/post-activation-keys.sh +./integration-tests/scripts/post-environments.sh # Run all integration tests. They will use 'testing' environment in configuration ENV_FOR_DYNACONF=testing pytest --junit-xml=./junit.xml -v integration-tests