From 579000e1740f7de86af42c535f1dae6a9fb24a3c Mon Sep 17 00:00:00 2001 From: Bradley Boutcher Date: Tue, 18 Aug 2020 11:17:15 -0400 Subject: [PATCH] Modify test directory references in automation The test directories need to reflect the new project test heirarchy, otherwise they will not be able to access the correct resources. --- .gitignore | 6 +++--- Jenkinsfile | 6 ++++-- tests/conjur-host-identity/docker-compose.yml | 4 ++-- tests/conjur/access_token | 5 ----- tests/conjur/docker-compose.yml | 4 ++-- tests/conjur/test.sh | 2 +- 6 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 tests/conjur/access_token diff --git a/.gitignore b/.gitignore index 87add2b02..0f1630897 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ .DS_Store # We don't care about test outputs -tests/junit/ -tests/conjur.pem -tests/access_token +tests/*/junit/ +tests/*/conjur.pem +tests/*/access_token # We should never check in pycache directories **/__pycache__/ diff --git a/Jenkinsfile b/Jenkinsfile index ef4601aad..8ea70936e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,16 +21,18 @@ pipeline { stage('Run tests') { parallel { stage("Test Ansible-Conjur-Collection") { + agent { label 'executor-v2-large' } + steps { sh './ci/test.sh conjur' - junit 'tests/junit/*' + junit 'tests/conjur/junit/*' } } stage("Test Ansible-Conjur-Host-Identity") { steps { sh './ci/test.sh conjur-host-identity' - junit 'tests/junit/*' + junit 'tests/conjur-host-identity/junit/*' } } } diff --git a/tests/conjur-host-identity/docker-compose.yml b/tests/conjur-host-identity/docker-compose.yml index fe317cffe..eb1e98202 100644 --- a/tests/conjur-host-identity/docker-compose.yml +++ b/tests/conjur-host-identity/docker-compose.yml @@ -12,8 +12,8 @@ services: CONJUR_CUSTOM_AUTHN_API_KEY: ${CUSTOM_CONJUR_AUTHN_API_KEY} COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME} volumes: - - ..:/conjurinc/cyberark.conjur-host-identity/ - - ../tests:/conjurinc/tests/ + - ../..:/conjurinc/cyberark.conjur-host-identity/ + - ../conjur-host-identity:/conjurinc/tests/ - /var/run/docker.sock:/var/run/docker.sock pg: image: postgres:9.3 diff --git a/tests/conjur/access_token b/tests/conjur/access_token deleted file mode 100644 index 3c215b47d..000000000 --- a/tests/conjur/access_token +++ /dev/null @@ -1,5 +0,0 @@ -{ - "protected": "eyJhbGciOiJjb25qdXIub3JnL3Nsb3NpbG8vdjIiLCJraWQiOiI0OTkwZTBhODE5NzkyOTQyMThiZDIyOWEzYjA4ZGE5YzQ3YjE5YzM4NjRhNTUxMDI3NzFiZDgyOWVkYmJjYmRhIn0=", - "payload": "eyJzdWIiOiJob3N0L2Fuc2libGUvYW5zaWJsZS1tYXN0ZXIiLCJpYXQiOjE1OTc2ODQ4NzV9", - "signature": "wKLBEsOO-SGbfvUSsve4Lc6NxQe2d9eeiaJwSLHBig3abOXWFGRRAmngextGKRdAaBu5SOUAau4TXugOOGKGPAL1jzY8L4qw6N1XPTl3riKrDhwf8h-xyqqWx1jQ0nre9Ey-_fJzuTGdH5wp9EMpTInvUkMiyNbkTvvV7XwbvvK78w-vN1jamZn9ja-z265x5XRpgUILRO2Xlm5LHOfwzTGTWQBxU-OQXKFPATB_YYNY9lpkfEanlWwse35JNDQF87Z5sPj0COCluptgnBgS3yq7hbqC2s3AYAmpDS38hpe_jteMxASgY2xEruQ_ALU5RcTqQY50loHjUCwfegNnlbRfHzLrpC5DlGvjaBPtpILrDNsPQl-8_Fer_jvW8CNU" -} diff --git a/tests/conjur/docker-compose.yml b/tests/conjur/docker-compose.yml index 233b51996..0e1837570 100644 --- a/tests/conjur/docker-compose.yml +++ b/tests/conjur/docker-compose.yml @@ -15,8 +15,8 @@ services: links: - "conjur_https:conjur-https" volumes: - - ../plugins:/root/.ansible/plugins - - ..:/cyberark + - ../../plugins:/root/.ansible/plugins + - ../..:/cyberark - /var/run/docker.sock:/var/run/docker.sock pg: diff --git a/tests/conjur/test.sh b/tests/conjur/test.sh index 1644de21d..03ce7baca 100755 --- a/tests/conjur/test.sh +++ b/tests/conjur/test.sh @@ -95,7 +95,7 @@ function run_test_case { fi docker-compose exec -T ansible bash -exc " - cd tests + cd tests/conjur # If env vars were provided, load them if [ -e 'test_cases/${test_case}/env' ]; then