From cbe96fffc43bdc7deac382d2f9a19e12a46ffb41 Mon Sep 17 00:00:00 2001 From: Michal Kovarik Date: Apr 01 2020 11:19:27 +0000 Subject: C3I-97: Avoid too long route Combination of namespace name and route name could result in very long dns which is not accepted. Creating additional route for test with static route name 'waiverdb' - namespace is dedicated for this run - no collisions. --- diff --git a/openshift/pipelines/snippets/waiverdb-build-and-test.groovy b/openshift/pipelines/snippets/waiverdb-build-and-test.groovy index dc25bf4..9b8336b 100644 --- a/openshift/pipelines/snippets/waiverdb-build-and-test.groovy +++ b/openshift/pipelines/snippets/waiverdb-build-and-test.groovy @@ -195,8 +195,12 @@ stage("Functional tests phase") { c3i.deployAndWait(script: this, objs: models, timeout: 15) def appPod = openshift.selector('pods', ['environment': env.ENVIRONMENT_LABEL, 'service': 'web']).object() env.IMAGE_DIGEST = appPod.status.containerStatuses[0].imageID.split('@')[1] + // Create route with short name + openshift.create('route', 'edge', 'waiverdb', "--service=waiverdb-test-${env.TEST_ID}-web") + // Give some time to active the route + sh 'sleep 5' // Run functional tests - def route_hostname = openshift.selector('routes', ['environment': env.ENVIRONMENT_LABEL]).object().spec.host + def route_hostname = openshift.selector('routes', 'waiverdb').object().spec.host echo "Running tests against https://${route_hostname}/" withEnv(["WAIVERDB_TEST_URL=https://${route_hostname}/"]) { sh 'py.test-3 -v --junitxml=junit-functional-tests.xml functional-tests/'