diff --git a/README.md b/README.md index ed77245b..d8bc32d5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repo now includes a set of modules which contains different acceptances tests. This acceptance tests rely on having an environment to run against. -In order to point to an environment you can export the following *ENVIROMENTAL VARIABLES* +In order to point to an environment you can export the following *ENVIROMENT VARIABLES* ``` > export GATEWAY_HOST=: @@ -11,6 +11,18 @@ In order to point to an environment you can export the following *ENVIROMENTAL V > export REALM=activiti ``` +to use *https* rather than *http*: +``` +> export GATEWAY_PROTOCOL=https +> export SSO_PROTOCOL=https +``` + +or specify the full URL: +``` +> export GATEWAY_URL= +> export SSO_URL= +``` + You can use our HELM charts hosted here: [Activiti Cloud HELM Charts](https://github.com/Activiti/activiti-cloud-charts/tree/master/activiti-cloud-full-example) to create these environments with all the services that are tested by these acceptance tests. diff --git a/apps-acceptance-tests/src/main/resources/config-env.properties b/apps-acceptance-tests/src/main/resources/config-env.properties index 7cf47ef4..81311905 100644 --- a/apps-acceptance-tests/src/main/resources/config-env.properties +++ b/apps-acceptance-tests/src/main/resources/config-env.properties @@ -1,3 +1,5 @@ -realm=springboot -auth.url=http://${SSO_HOST}/auth/realms/${realm}/protocol/openid-connect/token -apps.url=http://${GATEWAY_HOST}/apps \ No newline at end of file +realm=activiti +sso.url=${sso.protocol:http}://${sso.host}/auth +auth.url=${sso.url}/realms/${realm}/protocol/openid-connect/token +gateway.url=${gateway.protocol:http}://${gateway.host} +apps.url=${gateway.url}/apps \ No newline at end of file diff --git a/modeling-acceptance-tests/src/main/resources/config-env.properties b/modeling-acceptance-tests/src/main/resources/config-env.properties index 8f0f6ee9..862f3c99 100644 --- a/modeling-acceptance-tests/src/main/resources/config-env.properties +++ b/modeling-acceptance-tests/src/main/resources/config-env.properties @@ -1,4 +1,6 @@ realm=activiti -auth.url=http://${SSO_HOST}/auth/realms/${realm}/protocol/openid-connect/token +sso.url=${sso.protocol:http}://${sso.host}/auth +auth.url=${sso.url}/realms/${realm}/protocol/openid-connect/token +gateway.url=${gateway.protocol:http}://${gateway.host} +modeling.url=${gateway.url}/${modeling.path} modeling.path=activiti-cloud-modeling-backend -modeling.url=http://${GATEWAY_HOST}/${modeling.path} \ No newline at end of file diff --git a/multiple-runtime-acceptance-tests/src/main/resources/config-env.properties b/multiple-runtime-acceptance-tests/src/main/resources/config-env.properties index 0936a1d8..df05fdde 100644 --- a/multiple-runtime-acceptance-tests/src/main/resources/config-env.properties +++ b/multiple-runtime-acceptance-tests/src/main/resources/config-env.properties @@ -1,6 +1,8 @@ realm=springboot -auth.url=http://${SSO_HOST}/auth/realms/${realm}/protocol/openid-connect/token -audit.event.url=http://${GATEWAY_HOST}/audit -runtime.bundle.url=http://${GATEWAY_HOST}/rb-my-app -runtime.bundle.another.url=http://${GATEWAY_HOST}/rb-other-app -query.url=http://${GATEWAY_HOST}/query \ No newline at end of file +sso.url=${sso.protocol:http}://${sso.host}/auth +auth.url=${sso.url}/realms/${realm}/protocol/openid-connect/token +gateway.url=${gateway.protocol:http}://${gateway.host} +audit.event.url=${gateway.url}/audit +runtime.bundle.url=${gateway.url}/rb-my-app +runtime.bundle.another.url=${gateway.url}/rb-other-app +query.url=${gateway.url}/query diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..3ae40112 --- /dev/null +++ b/run.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +export REALM=activiti +export SSO_PROTOCOL=${SSO_PROTOCOL:-http} +export SSO_HOST=${SSO_HOST:-activiti-keycloak.jx-staging.35.228.195.195.nip.io} +export GATEWAY_PROTOCOL=${GATEWAY_PROTOCOL:-http} +export GATEWAY_HOST=${GATEWAY_HOST:-activiti-cloud-gateway.jx-staging.35.228.195.195.nip.io} +export SSO_URL=${SSO_URL:-${SSO_PROTOCOL}://${SSO_HOST}/auth} +export GATEWAY_URL=${GATEWAY_URL:-${GATEWAY_PROTOCOL}://${GATEWAY_HOST}} +echo running tests on env: +echo REALM=${REALM} +echo SSO_URL=${SSO_URL} +echo GATEWAY_URL=${GATEWAY_URL} +mvn clean verify serenity:aggregate diff --git a/runtime-acceptance-tests/src/main/resources/config-env.properties b/runtime-acceptance-tests/src/main/resources/config-env.properties index 794b892a..ecc009f1 100644 --- a/runtime-acceptance-tests/src/main/resources/config-env.properties +++ b/runtime-acceptance-tests/src/main/resources/config-env.properties @@ -1,7 +1,9 @@ realm=activiti -auth.url=http://${SSO_HOST}/auth/realms/${realm}/protocol/openid-connect/token -audit.event.url=http://${GATEWAY_HOST}/audit -runtime.bundle.url=http://${GATEWAY_HOST}/rb-my-app -query.url=http://${GATEWAY_HOST}/query -graphql.ws.url=ws://${GATEWAY_HOST}/ws/graphql -graphql.url=http://${GATEWAY_HOST}/graphql \ No newline at end of file +sso.url=${sso.protocol:http}://${sso.host}/auth +auth.url=${sso.url}/realms/${realm}/protocol/openid-connect/token +gateway.url=${gateway.protocol:http}://${gateway.host} +audit.event.url=${gateway.url}/audit +runtime.bundle.url=${gateway.url}/rb-my-app +query.url=${gateway.url}/query +graphql.ws.url=#{"${gateway.url}".replace('http', 'ws')}/ws/graphql +graphql.url=${gateway.url}/graphql diff --git a/security-policies-acceptance-tests/src/main/resources/config-env.properties b/security-policies-acceptance-tests/src/main/resources/config-env.properties index 794b892a..ecc009f1 100644 --- a/security-policies-acceptance-tests/src/main/resources/config-env.properties +++ b/security-policies-acceptance-tests/src/main/resources/config-env.properties @@ -1,7 +1,9 @@ realm=activiti -auth.url=http://${SSO_HOST}/auth/realms/${realm}/protocol/openid-connect/token -audit.event.url=http://${GATEWAY_HOST}/audit -runtime.bundle.url=http://${GATEWAY_HOST}/rb-my-app -query.url=http://${GATEWAY_HOST}/query -graphql.ws.url=ws://${GATEWAY_HOST}/ws/graphql -graphql.url=http://${GATEWAY_HOST}/graphql \ No newline at end of file +sso.url=${sso.protocol:http}://${sso.host}/auth +auth.url=${sso.url}/realms/${realm}/protocol/openid-connect/token +gateway.url=${gateway.protocol:http}://${gateway.host} +audit.event.url=${gateway.url}/audit +runtime.bundle.url=${gateway.url}/rb-my-app +query.url=${gateway.url}/query +graphql.ws.url=#{"${gateway.url}".replace('http', 'ws')}/ws/graphql +graphql.url=${gateway.url}/graphql