diff options
Diffstat (limited to 'ansible_collections/cyberark/conjur/tests')
41 files changed, 69 insertions, 462 deletions
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/.dockerignore b/ansible_collections/cyberark/conjur/tests/conjur_variable/.dockerignore deleted file mode 100644 index 5ed3ebd29..000000000 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -conjur-intro/
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/.pytest_cache/v/cache/nodeids b/ansible_collections/cyberark/conjur/tests/conjur_variable/.pytest_cache/v/cache/nodeids index c6b2f5e13..b70b3a229 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/.pytest_cache/v/cache/nodeids +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/.pytest_cache/v/cache/nodeids @@ -1,11 +1,11 @@ [ - "test_cases/retrieve-variable-bad-cert-path/tests/test_default.py::test_retrieval_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable-bad-certs/tests/test_default.py::test_retrieval_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py::test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable-into-file/tests/test_default.py::test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable-no-cert-provided/tests/test_default.py::test_retrieval_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable-with-authn-token-bad-cert/tests/test_default.py::test_retrieve_secret_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable-with-authn-token/tests/test_default.py::test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py::test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]", - "test_cases/retrieve-variable/tests/test_default.py::test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" + "test_cases/retrieve-variable-bad-cert-path/tests/test_default.py::test_retrieval_failed[docker://dev-ansible-1]", + "test_cases/retrieve-variable-bad-certs/tests/test_default.py::test_retrieval_failed[docker://dev-ansible-1]", + "test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py::test_retrieved_secret[docker://dev-ansible-1]", + "test_cases/retrieve-variable-into-file/tests/test_default.py::test_retrieved_secret[docker://dev-ansible-1]", + "test_cases/retrieve-variable-no-cert-provided/tests/test_default.py::test_retrieval_failed[docker://dev-ansible-1]", + "test_cases/retrieve-variable-with-authn-token-bad-cert/tests/test_default.py::test_retrieve_secret_failed[docker://dev-ansible-1]", + "test_cases/retrieve-variable-with-authn-token/tests/test_default.py::test_retrieved_secret[docker://dev-ansible-1]", + "test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py::test_retrieved_secret[docker://dev-ansible-1]", + "test_cases/retrieve-variable/tests/test_default.py::test_retrieved_secret[docker://dev-ansible-1]" ]
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/Dockerfile b/ansible_collections/cyberark/conjur/tests/conjur_variable/Dockerfile deleted file mode 100644 index 293ccdca0..000000000 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM ubuntu:20.04 - -ENV DEBIAN_FRONTEND=noninteractive - -WORKDIR /cyberark - -# install python 3 -RUN apt-get update && \ - apt-get install -y python3-pip && \ - pip3 install --upgrade pip - -ARG ANSIBLE_VERSION -# install ansible and its test tool -RUN pip3 install ansible==${ANSIBLE_VERSION}.* pytest-testinfra - -# install docker installation requirements -RUN apt-get update && \ - apt-get install -y apt-transport-https \ - ca-certificates \ - curl \ - software-properties-common - -# install docker -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -RUN add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) \ - stable" - -RUN apt-get update && \ - apt-get -y install docker-ce diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/Dockerfile_nginx b/ansible_collections/cyberark/conjur/tests/conjur_variable/Dockerfile_nginx deleted file mode 100644 index 6f1e28107..000000000 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/Dockerfile_nginx +++ /dev/null @@ -1,17 +0,0 @@ -FROM nginx:1.13.3 - -RUN export DEBIAN_FRONTEND=noninteractive && \ - apt-get update && \ - apt-get install -y iputils-ping \ - procps \ - openssl && \ - rm -rf /var/lib/apt/lists/* - -WORKDIR /etc/nginx/ - -COPY proxy/ssl.conf /etc/ssl/openssl.cnf -COPY proxy/default.conf /etc/nginx/conf.d/default.conf - -RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ - -config /etc/ssl/openssl.cnf -extensions v3_ca \ - -keyout cert.key -out cert.crt diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/docker-compose.yml b/ansible_collections/cyberark/conjur/tests/conjur_variable/docker-compose.yml deleted file mode 100644 index 01294d94b..000000000 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/docker-compose.yml +++ /dev/null @@ -1,67 +0,0 @@ -version: '3' -services: - ansible: - image: ansiblecontainername - container_name: ${COMPOSE_PROJECT_NAME}-ansible - build: - context: . - dockerfile: Dockerfile - args: - ANSIBLE_VERSION: ${ANSIBLE_VERSION} - entrypoint: sleep - command: infinity - environment: - CONJUR_APPLIANCE_URL: ${CONJUR_APPLIANCE_URL} - CONJUR_ACCOUNT: ${CONJUR_ACCOUNT} - CONJUR_AUTHN_LOGIN: ${CONJUR_AUTHN_LOGIN} - CONJUR_AUTHN_API_KEY: ${ANSIBLE_MASTER_AUTHN_API_KEY} - COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME} - networks: - - "${DOCKER_NETWORK}" - volumes: - - ../../plugins:/root/.ansible/plugins - - ../..:/cyberark - - /var/run/docker.sock:/var/run/docker.sock - - pg: - image: postgres:9.4 - environment: - POSTGRES_HOST_AUTH_METHOD: password - POSTGRES_PASSWORD: StrongPass - - conjur: - image: cyberark/conjur - command: server -a cucumber -p 3000 - environment: - DATABASE_URL: postgres://postgres:StrongPass@pg/postgres - CONJUR_DATA_KEY: "W0BuL8iTr/7QvtjIluJbrb5LDAnmXzmcpxkqihO3dXA=" - depends_on: - - pg - - conjur_https: - hostname: conjur-https - build: - context: . - dockerfile: Dockerfile_nginx - entrypoint: nginx-debug -g 'daemon off;' - environment: - TERM: xterm - depends_on: - - conjur - - conjur_cli: - image: cyberark/conjur-cli:5 - entrypoint: sleep - command: infinity - environment: - CONJUR_APPLIANCE_URL: http://conjur:3000 - CONJUR_ACCOUNT: cucumber - CONJUR_AUTHN_LOGIN: admin - CONJUR_AUTHN_API_KEY: ${CONJUR_ADMIN_AUTHN_API_KEY} - volumes: - - ./policy:/policy - -networks: - dap_net: - name: dap_net - external: true diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable index 08c9ccb5e..bc362ea43 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.575" timestamp="2022-09-09T15:07:48.307449" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable.tests.test_default" name="test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.530" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.476" timestamp="2023-09-28T17:28:54.180417" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.450" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path index 0ed22fad7..7d7b7b4a7 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.458" timestamp="2022-09-09T15:07:51.763243" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-bad-cert-path.tests.test_default" name="test_retrieval_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.422" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.381" timestamp="2023-09-28T17:28:57.025234" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-bad-cert-path.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.357" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs index 6b0b865c1..684fdb89d 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.459" timestamp="2022-09-09T15:07:55.122204" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-bad-certs.tests.test_default" name="test_retrieval_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.423" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.372" timestamp="2023-09-28T17:28:59.744035" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-bad-certs.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.348" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs index 9f1fc6494..7cd98843b 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.568" timestamp="2022-09-09T15:07:58.851346" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-disable-verify-certs.tests.test_default" name="test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.532" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.484" timestamp="2023-09-28T17:29:03.245129" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-disable-verify-certs.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.458" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file index 5fcc68f80..c9082babb 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.863" timestamp="2022-09-09T15:08:02.658511" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-into-file.tests.test_default" name="test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.828" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.721" timestamp="2023-09-28T17:29:06.557606" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-into-file.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.695" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided index f1c9029a8..34fd1fa03 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.464" timestamp="2022-09-09T15:08:06.406130" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-no-cert-provided.tests.test_default" name="test_retrieval_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.429" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.373" timestamp="2023-09-28T17:29:09.688977" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-no-cert-provided.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.349" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token index 407145017..c3f0e5978 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.551" timestamp="2022-09-09T15:08:10.115226" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-with-authn-token.tests.test_default" name="test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.516" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.585" timestamp="2023-09-28T17:29:12.796986" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-with-authn-token.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.552" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert index 680f3913f..db2705ced 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.460" timestamp="2022-09-09T15:08:13.541799" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-with-authn-token-bad-cert.tests.test_default" name="test_retrieve_secret_failed[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.425" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="1.129" timestamp="2023-09-28T17:29:16.832828" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-with-authn-token-bad-cert.tests.test_default" name="test_retrieve_secret_failed[docker://dev-ansible-1]" time="1.046" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret index 65e72fecb..7747d9fd7 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.571" timestamp="2022-09-09T15:08:17.207877" hostname="96989ca8092d"><testcase classname="test_cases.retrieve-variable-with-spaces-secret.tests.test_default" name="test_retrieved_secret[docker://jenkinscyberarkansibleconjurcollectionv1201conjurvariable-ansible]" time="0.536" /></testsuite></testsuites>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.746" timestamp="2023-09-28T17:29:22.880901" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-with-spaces-secret.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.695" /></testsuite></testsuites>
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/policy/root.yml b/ansible_collections/cyberark/conjur/tests/conjur_variable/policy/root.yml deleted file mode 100644 index dbaea73fa..000000000 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/policy/root.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- !policy - id: ansible - annotations: - description: Policy for Ansible master - body: - - - !host - id: ansible-master - annotations: - description: Host for running Ansible on remote targets - - - &variables - - !variable test-secret - - !variable test-secret-in-file - - !variable var with spaces - - - !permit - role: !host ansible-master - privileges: [ read, execute ] - resource: *variables diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/proxy/default.conf b/ansible_collections/cyberark/conjur/tests/conjur_variable/proxy/default.conf deleted file mode 100644 index 578b3c5f8..000000000 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/proxy/default.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - listen 80; - return 301 https://conjur$request_uri; -} - -server { - listen 443; - server_name localhost; - ssl_certificate /etc/nginx/cert.crt; - ssl_certificate_key /etc/nginx/cert.key; - - ssl on; - ssl_session_cache builtin:1000 shared:SSL:10m; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; - ssl_prefer_server_ciphers on; - - access_log /var/log/nginx/access.log; - - location / { - proxy_pass http://conjur:3000; - } - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } - -} diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/proxy/ssl.conf b/ansible_collections/cyberark/conjur/tests/conjur_variable/proxy/ssl.conf deleted file mode 100644 index 1b11cd755..000000000 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/proxy/ssl.conf +++ /dev/null @@ -1,39 +0,0 @@ -[req] -default_bits = 2048 -prompt = no -default_md = sha256 -req_extensions = req_ext -distinguished_name = dn -x509_extensions = v3_ca # The extentions to add to the self signed cert -req_extensions = v3_req -x509_extensions = usr_cert - -[ dn ] -C=IL -ST=Israel -L=TLV -O=Onyx -OU=CyberArk -CN=conjur-https - -[ usr_cert ] -basicConstraints=CA:FALSE -nsCertType = client, server, email -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection -nsComment = "OpenSSL Generated Certificate" -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer - -[ v3_req ] -extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection -basicConstraints = CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -[ v3_ca ] -subjectAltName = @alt_names - -[ alt_names ] -DNS.1 = localhost -DNS.2 = conjur-https -IP.1 = 127.0.0.1 diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh b/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh index 464921b81..c82810054 100755 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh @@ -1,164 +1,6 @@ -#!/bin/bash -eu - +#!/bin/bash -eux set -o pipefail - -# normalises project name by filtering non alphanumeric characters and transforming to lowercase -declare -x COMPOSE_PROJECT_NAME='' -declare -x ENTERPRISE_PROJECT='conjur-intro-variable' -declare -x ANSIBLE_PROJECT='' - -declare -x ANSIBLE_MASTER_AUTHN_API_KEY='' -declare -x CONJUR_ADMIN_AUTHN_API_KEY='' -declare -x DOCKER_NETWORK="default" -declare -x ANSIBLE_VERSION="${ANSIBLE_VERSION:-6}" - -ANSIBLE_PROJECT=$(echo "${BUILD_TAG:-ansible-plugin-testing}-conjur-variable" | sed -e 's/[^[:alnum:]]//g' | tr '[:upper:]' '[:lower:]') - -enterprise="false" -cli_cid="" -test_dir="$(pwd)" - -function cleanup { - echo 'Removing test environment' - echo '---' - - # Escape conjur-intro dir if Enterprise setup fails - cd "${test_dir}" - - if [[ -d conjur-intro ]]; then - pushd conjur-intro - COMPOSE_PROJECT_NAME="${ENTERPRISE_PROJECT}" - ./bin/dap --stop - popd - rm -rf conjur-intro - fi - - COMPOSE_PROJECT_NAME="${ANSIBLE_PROJECT}" - docker-compose down -v - rm -f conjur.pem \ - access_token -} -trap cleanup EXIT - -while getopts 'e' flag; do - case "${flag}" in - e) enterprise="true" ;; - *) exit 1 ;; - esac -done - -cleanup - -function wait_for_conjur { - echo "Waiting for Conjur server to come up" - docker-compose exec -T conjur conjurctl wait -r 30 -p 3000 -} - -function fetch_ssl_certs { - echo "Fetching SSL certs" - service_id="conjur_https" - cert_path="cert.crt" - if [[ "${enterprise}" == "true" ]]; then - service_id="conjur-master.mycompany.local" - cert_path="/etc/ssl/certs/ca.pem" - fi - - (docker-compose exec -T "${service_id}" cat "${cert_path}") > conjur.pem -} - -function setup_conjur_resources { - echo "Configuring Conjur via CLI" - - policy_path="root.yml" - if [[ "${enterprise}" == "false" ]]; then - policy_path="/policy/${policy_path}" - fi - - docker exec "${cli_cid}" bash -c " - conjur policy load root ${policy_path} - conjur variable values add ansible/test-secret test_secret_password - conjur variable values add ansible/test-secret-in-file test_secret_in_file_password - conjur variable values add 'ansible/var with spaces' var_with_spaces_secret_password - " -} - -function setup_admin_api_key { - echo "Fetching admin API key" - if [[ "$enterprise" == "true" ]]; then - CONJUR_ADMIN_AUTHN_API_KEY="$(docker exec "${cli_cid}" conjur user rotate_api_key)" - else - CONJUR_ADMIN_AUTHN_API_KEY="$(docker-compose exec -T conjur conjurctl role retrieve-key "${CONJUR_ACCOUNT}":user:admin)" - fi -} - -function setup_ansible_api_key { - echo "Fetching Ansible master host credentials" - ANSIBLE_MASTER_AUTHN_API_KEY="$(docker exec "${cli_cid}" conjur host rotate_api_key --host ansible/ansible-master)" -} - -function setup_access_token { - echo "Get Access Token" - docker exec "${cli_cid}" bash -c " - export CONJUR_AUTHN_LOGIN=host/ansible/ansible-master - export CONJUR_AUTHN_API_KEY=\"$ANSIBLE_MASTER_AUTHN_API_KEY\" - conjur authn authenticate - " > access_token -} - -function setup_conjur_open_source() { - docker-compose up -d --build conjur \ - conjur_https - - wait_for_conjur - fetch_ssl_certs - setup_admin_api_key - - echo "Creating Conjur CLI with admin credentials" - docker-compose up -d conjur_cli - cli_cid="$(docker-compose ps -q conjur_cli)" - - setup_conjur_resources - setup_ansible_api_key - setup_access_token -} - -function setup_conjur_enterprise() { - git clone --single-branch --branch main https://github.com/conjurdemos/conjur-intro.git - pushd ./conjur-intro - - echo "Provisioning Enterprise leader and follower" - ./bin/dap --provision-master - ./bin/dap --provision-follower - - cp ../policy/root.yml . - - # Run 'sleep infinity' in the CLI container, so the scripts - # have access to an alive and authenticated CLI until the script terminates - cli_cid="$(docker-compose run -d \ - -w /src/cli \ - --entrypoint sleep client infinity)" - - echo "Authenticate Conjur CLI container" - docker exec "${cli_cid}" \ - /bin/bash -c " - if [ ! -e /root/conjur-demo.pem ]; then - yes 'yes' | conjur init -u ${CONJUR_APPLIANCE_URL} -a ${CONJUR_ACCOUNT} - fi - conjur authn login -u admin -p MySecretP@ss1 - hostname -I - " - - fetch_ssl_certs - setup_conjur_resources - setup_admin_api_key - setup_ansible_api_key - setup_access_token - - echo "Relocate credential files" - mv conjur.pem ../. - mv access_token ../. - popd -} +source "$(git rev-parse --show-toplevel)/dev/util.sh" function run_test_cases { for test_case in test_cases/*; do @@ -167,15 +9,15 @@ function run_test_cases { } function run_test_case { - local test_case=$1 + local test_case="$1" echo "---- testing ${test_case} ----" if [ -z "$test_case" ]; then - echo ERROR: run_test called with no argument 1>&2 + echo ERROR: run_test_case called with no argument 1>&2 exit 1 fi - docker-compose exec -T ansible bash -exc " + docker exec "$(ansible_cid)" bash -exc " cd tests/conjur_variable # If env vars were provided, load them @@ -183,7 +25,7 @@ function run_test_case { . ./test_cases/${test_case}/env fi - # You can add -vvvv here for debugging + # You can add -vvvvv here for debugging ansible-playbook 'test_cases/${test_case}/playbook.yml' py.test --junitxml='./junit/${test_case}' \ @@ -192,34 +34,4 @@ function run_test_case { " } -function main() { - if [[ "$enterprise" == "true" ]]; then - echo "Deploying Conjur Enterprise" - - export CONJUR_APPLIANCE_URL="https://conjur-master.mycompany.local" - export CONJUR_ACCOUNT="demo" - COMPOSE_PROJECT_NAME="${ENTERPRISE_PROJECT}" - DOCKER_NETWORK="dap_net" - - setup_conjur_enterprise - else - echo "Deploying Conjur Open Source" - - export CONJUR_APPLIANCE_URL="https://conjur-https" - export CONJUR_ACCOUNT="cucumber" - COMPOSE_PROJECT_NAME="${ANSIBLE_PROJECT}" - - setup_conjur_open_source - fi - - COMPOSE_PROJECT_NAME="${ANSIBLE_PROJECT}" - export CONJUR_AUTHN_LOGIN="host/ansible/ansible-master" - - echo "Preparing Ansible for test run" - docker-compose up -d --build ansible - - echo "Running tests" - run_test_cases -} - -main +run_test_cases diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests/test_default.py index a3f2bbdf3..e3923d3a1 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests/test_default.py @@ -2,9 +2,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieval_failed(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests/test_default.py index a3f2bbdf3..e3923d3a1 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests/test_default.py @@ -2,9 +2,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieval_failed(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py index a98ce29e9..33f7d38c0 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py @@ -2,9 +2,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieved_secret(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/env b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/env index 2363951d1..5744dfaa7 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/env +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/env @@ -1 +1 @@ -export CONJUR_CERT_FILE=./conjur.pem +export CONJUR_CERT_FILE=/cyberark/dev/conjur.pem diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/tests/test_default.py index 5d05f950b..e277a4a43 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-into-file/tests/test_default.py @@ -3,9 +3,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieved_secret(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests/test_default.py index a3f2bbdf3..e3923d3a1 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests/test_default.py @@ -2,9 +2,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieval_failed(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/env b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/env index b93328faf..0984c7be8 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/env +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/env @@ -1,4 +1,4 @@ unset CONJUR_AUTHN_API_KEY unset CONJUR_AUTHN_LOGIN -export CONJUR_AUTHN_TOKEN_FILE=./access_token +export CONJUR_AUTHN_TOKEN_FILE=/cyberark/dev/access_token export CONJUR_CERT_FILE=./test_cases/retrieve-variable-with-authn-token-bad-cert/bad-cert.pem diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/tests/test_default.py index c87b160f4..912bce86b 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token-bad-cert/tests/test_default.py @@ -2,9 +2,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieve_secret_failed(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/env b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/env index f4e4155ea..913b0bee4 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/env +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/env @@ -1,4 +1,4 @@ -export CONJUR_CERT_FILE=./conjur.pem +export CONJUR_CERT_FILE=/cyberark/dev/conjur.pem unset CONJUR_AUTHN_API_KEY unset CONJUR_AUTHN_LOGIN -export CONJUR_AUTHN_TOKEN_FILE=./access_token +export CONJUR_AUTHN_TOKEN_FILE=/cyberark/dev/access_token diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests/test_default.py index a98ce29e9..33f7d38c0 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests/test_default.py @@ -2,9 +2,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieved_secret(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/env b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/env index 2363951d1..5744dfaa7 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/env +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/env @@ -1 +1 @@ -export CONJUR_CERT_FILE=./conjur.pem +export CONJUR_CERT_FILE=/cyberark/dev/conjur.pem diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py index 145cbb2eb..a5a97adad 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py @@ -2,9 +2,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieved_secret(host): diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/env b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/env index 2363951d1..5744dfaa7 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/env +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/env @@ -1 +1 @@ -export CONJUR_CERT_FILE=./conjur.pem +export CONJUR_CERT_FILE=/cyberark/dev/conjur.pem diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/tests/test_default.py b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/tests/test_default.py index a98ce29e9..4638695f6 100644 --- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/tests/test_default.py +++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test_cases/retrieve-variable/tests/test_default.py @@ -2,9 +2,9 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os -import testinfra.utils.ansible_runner -testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible'] + +testinfra_hosts = [os.environ['COMPOSE_PROJECT_NAME'] + '-ansible-1'] def test_retrieved_secret(host): diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt index 92bf04480..a81ded000 100644 --- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt +++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt @@ -3,7 +3,6 @@ Jenkinsfile shebang tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by summon utility (in Jenkinsfile), not via Python ci/build_release shebang -ci/parse-changelog.sh shebang ci/publish_to_galaxy shebang ci/test.sh shebang secrets.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt index 6049963fb..b643480a2 100644 --- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt +++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt @@ -3,7 +3,6 @@ dev/start.sh shebang tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by summon utility (in Jenkinsfile), not via Python ci/build_release shebang -ci/parse-changelog.sh shebang ci/publish_to_galaxy shebang ci/test.sh shebang secrets.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt index 5d750b26c..6615526dc 100644 --- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt +++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt @@ -3,7 +3,6 @@ dev/start.sh shebang tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python ci/build_release shebang -ci/parse-changelog.sh shebang ci/publish_to_galaxy shebang ci/test.sh shebang secrets.yml yamllint:unparsable-with-libyaml # File loaded by Summon utility (in Jenkinsfile), not via Python diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt index 5d750b26c..e456a5ff7 100644 --- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt +++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt @@ -1,10 +1,10 @@ -Jenkinsfile shebang -dev/start.sh shebang -tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python -roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python ci/build_release shebang -ci/parse-changelog.sh shebang ci/publish_to_galaxy shebang ci/test.sh shebang -secrets.yml yamllint:unparsable-with-libyaml # File loaded by Summon utility (in Jenkinsfile), not via Python -dev/policy/root.yml yamllint:unparsable-with-libyaml
\ No newline at end of file +dev/policy/root.yml yamllint:unparsable-with-libyaml +dev/start.sh shebang +dev/stop.sh shebang +dev/util.sh shebang +Jenkinsfile shebang +plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor +secrets.yml yamllint:unparsable-with-libyaml diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt index 00a2d8432..e456a5ff7 100644 --- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt +++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt @@ -1,11 +1,10 @@ -Jenkinsfile shebang -dev/start.sh shebang -tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python -roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python ci/build_release shebang -ci/parse-changelog.sh shebang ci/publish_to_galaxy shebang ci/test.sh shebang -secrets.yml yamllint:unparsable-with-libyaml # File loaded by Summon utility (in Jenkinsfile), not via Python dev/policy/root.yml yamllint:unparsable-with-libyaml -plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor # Lookup plugin added in v1.0.2
\ No newline at end of file +dev/start.sh shebang +dev/stop.sh shebang +dev/util.sh shebang +Jenkinsfile shebang +plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor +secrets.yml yamllint:unparsable-with-libyaml diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt new file mode 100644 index 000000000..e456a5ff7 --- /dev/null +++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt @@ -0,0 +1,10 @@ +ci/build_release shebang +ci/publish_to_galaxy shebang +ci/test.sh shebang +dev/policy/root.yml yamllint:unparsable-with-libyaml +dev/start.sh shebang +dev/stop.sh shebang +dev/util.sh shebang +Jenkinsfile shebang +plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor +secrets.yml yamllint:unparsable-with-libyaml diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt index 45c7c7e97..1ee255c73 100644 --- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt +++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt @@ -3,6 +3,5 @@ dev/start.sh shebang tests/conjur_variable/test.sh shebang roles/conjur_host_identity/tests/test.sh shebang ci/build_release shebang -ci/parse-changelog.sh shebang ci/publish_to_galaxy shebang ci/test.sh shebang
\ No newline at end of file diff --git a/ansible_collections/cyberark/conjur/tests/unit/Dockerfile b/ansible_collections/cyberark/conjur/tests/unit/Dockerfile index 66e584669..677862d96 100644 --- a/ansible_collections/cyberark/conjur/tests/unit/Dockerfile +++ b/ansible_collections/cyberark/conjur/tests/unit/Dockerfile @@ -1,5 +1,8 @@ ARG PYTHON_VERSION -FROM python:${PYTHON_VERSION} +FROM python:${PYTHON_VERSION}-slim + +RUN apt-get update && \ + apt-get install -y git ARG ANSIBLE_VERSION RUN pip install https://github.com/ansible/ansible/archive/${ANSIBLE_VERSION}.tar.gz --disable-pip-version-check diff --git a/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py b/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py index 7a0db1e12..995adf2da 100644 --- a/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py +++ b/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py @@ -2,7 +2,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type from unittest import TestCase -from unittest.mock import call, MagicMock, patch +from unittest.mock import MagicMock, patch from ansible.errors import AnsibleError from ansible.plugins.loader import lookup_loader |