diff --git a/.github/workflows/.ci-metadata.json b/.github/workflows/.ci-metadata.json index 4323830..d3200b3 100644 --- a/.github/workflows/.ci-metadata.json +++ b/.github/workflows/.ci-metadata.json @@ -1,3 +1,3 @@ { - "template-version": "v2.5.2" + "template-version": "v2.6.1" } diff --git a/Dockerfile-splunk b/Dockerfile-splunk deleted file mode 100644 index bd44a4b..0000000 --- a/Dockerfile-splunk +++ /dev/null @@ -1,16 +0,0 @@ -ARG SPLUNK_VERSION=latest -FROM splunk/splunk:$SPLUNK_VERSION -ARG SPLUNK_VERSION=latest -ARG SPLUNK_APP_ID=TA_UNKNOWN -ARG SPLUNK_APP_PACKAGE=$SPLUNK_APP_PACKAGE -RUN echo Splunk VERSION=$SPLUNK_VERSION - -COPY deps/apps /opt/splunk/etc/apps/ -COPY deps/apps/splunk-add-on-for-modinput-test/output /opt/splunk/etc/apps/ -COPY deps/build/addonfactory_test_matrix_splunk/packages/all/common /opt/splunk/etc/apps/ -COPY deps/build/addonfactory_test_matrix_splunk/packages/all/sh /opt/splunk/etc/apps/ -COPY deps/build/addonfactory_test_matrix_splunk/packages/all/addon_factory_web /opt/splunk/etc/system/local -COPY $SPLUNK_APP_PACKAGE /opt/splunk/etc/apps/$SPLUNK_APP_ID - -COPY .pytest.expect /home/circleci/work_backend/.pytest.expect -COPY tests /home/circleci/work_backend/tests diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml deleted file mode 100644 index c9a3111..0000000 --- a/docker-compose-ci.yml +++ /dev/null @@ -1,187 +0,0 @@ -## -## SPDX-FileCopyrightText: 2021 Splunk, Inc. -## SPDX-License-Identifier: LicenseRef-Splunk-8-2021 -## -## -version: "3.7" - -services: - test: - environment: - - SAUCE_USERNAME=${SAUCE_USERNAME} - - SAUCE_PASSWORD=${SAUCE_PASSWORD} - - TEST_SET=${TEST_SET} - - TEST_TYPE=${TEST_TYPE} - - JOB_NAME=${JOB_NAME} - - SAUCE_TUNNEL_ID=${SAUCE_IDENTIFIER} - - SAUCE_TUNNEL_PARENT=none - - UI_TEST_HEADLESS=${UI_TEST_HEADLESS} - - RERUN_COUNT=${RERUN_COUNT} - - TEST_BROWSER=${TEST_BROWSER} - - RP_ENDPOINT=${RP_ENDPOINT} - - RP_UUID=${RP_UUID} - - RP_LAUNCH_ATTRIBUTES=${RP_LAUNCH_ATTRIBUTES} - - RP_PROJECT=${RP_PROJECT} - - RP_LAUNCH=${RP_LAUNCH} - - RP_LAUNCH_DESC=${RP_LAUNCH_DESC} - - IMAGE_TAG=${IMAGE_TAG} - env_file: - - test_credentials.env - build: - context: . - dockerfile: Dockerfile-tests - args: - IMAGE_TAG: ${IMAGE_TAG} - links: - - splunk - - sc4s - - http_proxy - - socks5 - volumes: - - results:/home/circleci/work - - sc4s: - image: ghcr.io/splunk/splunk-connect-for-syslog/container2:${SC4S_VERSION} - hostname: sc4s - #When this is enabled test_common will fail - # command: -det - ports: - - "514" - - "601" - - "514/udp" - - "5000-5050" - - "5000-5050/udp" - - "6514" - stdin_open: true - tty: true - environment: - - SPLUNK_HEC_URL=https://splunk:8088 - - SPLUNK_HEC_TOKEN=9b741d03-43e9-4164-908b-e09102327d22 - - SC4S_SOURCE_TLS_ENABLE=no - - SC4S_DEST_SPLUNK_HEC_TLS_VERIFY=no - - SC4S_LISTEN_JUNIPER_NETSCREEN_TCP_PORT=5000 - - SC4S_LISTEN_CISCO_ASA_TCP_PORT=5001 - - SC4S_LISTEN_CISCO_IOS_TCP_PORT=5002 - - SC4S_LISTEN_CISCO_MERAKI_TCP_PORT=5003 - - SC4S_LISTEN_JUNIPER_IDP_TCP_PORT=5004 - - SC4S_LISTEN_PALOALTO_PANOS_TCP_PORT=5005 - - SC4S_LISTEN_PFSENSE_TCP_PORT=5006 - - SC4S_LISTEN_CISCO_ASA_UDP_PORT=5001 - - SC4S_LISTEN_CISCO_IOS_UDP_PORT=5002 - - SC4S_LISTEN_CISCO_MERAKI_UDP_PORT=5003 - - SC4S_LISTEN_JUNIPER_IDP_UDP_PORT=5004 - - SC4S_LISTEN_PALOALTO_PANOS_UDP_PORT=5005 - - SC4S_LISTEN_PFSENSE_UDP_PORT=5006 - - SC4S_ARCHIVE_GLOBAL=no - - SC4S_LISTEN_CHECKPOINT_SPLUNK_NOISE_CONTROL=yes - - TEST_SC4S_ACTIVATE_EXAMPLES=yes - - socks5: - image: serjs/go-socks5-proxy:latest - hostname: socks5 - ports: - - "1080" - stdin_open: true - tty: true - links: - - splunk - environment: - - PROXY_USER=splunk_socks5 - - PROXY_PASSWORD=splunk_socks5 - splunk: - build: - context: . - dockerfile: Dockerfile-splunk - args: - SPLUNK_APP_ID: ${SPLUNK_APP_ID} - SPLUNK_APP_PACKAGE: ${SPLUNK_APP_PACKAGE} - SPLUNK_VERSION: ${SPLUNK_VERSION} - hostname: splunk - ports: - - "8000" - - "8088" - - "8089" - - "9997" - environment: - - SPLUNK_PASSWORD=Chang3d! - - SPLUNK_START_ARGS=--accept-license - - SPLUNK_HEC_TOKEN=9b741d03-43e9-4164-908b-e09102327d22 - - TEST_SET=${TEST_SET} - - RP_ENDPOINT=${RP_ENDPOINT} - - RP_UUID=${RP_UUID} - - RP_LAUNCH_ATTRIBUTES=${RP_LAUNCH_ATTRIBUTES} - - RP_PROJECT=${RP_PROJECT} - - RP_LAUNCH=${RP_LAUNCH} - - RP_LAUNCH_DESC=${RP_LAUNCH_DESC} - env_file: - - test_credentials.env - volumes: - - backend_results:/home/circleci/work_backend - links: - - sc4s - - sauceconnect: - build: - context: . - dockerfile: Dockerfile-saucelabs - environment: - - SAUCE_USERNAME=${SAUCE_USERNAME} - - SAUCE_PASSWORD=${SAUCE_PASSWORD} - - SAUCE_TUNNEL_ID=${SAUCE_IDENTIFIER} - - SAUCE_TUNNEL_PARENT=none - hostname: sauceconnect - ports: - - "4445" - - http_proxy: - build: - context: . - dockerfile: Dockerfile-http_proxy - hostname: http_proxy - ports: - - "3128" - stdin_open: true - environment: - - PROXY_USERNAME=user1 - - PROXY_PASSWORD=123456 - tty: true - - uf: - build: - context: . - dockerfile: Dockerfile-uf - args: - SPLUNK_APP_ID: ${SPLUNK_APP_ID} - SPLUNK_APP_PACKAGE: ${SPLUNK_APP_PACKAGE} - SPLUNK_VERSION: ${SPLUNK_VERSION} - hostname: uf - ports: - - "8089" - links: - - splunk - environment: - - SPLUNK_PASSWORD=Chang3d! - - SPLUNK_START_ARGS=--accept-license - volumes: - - results:/home/circleci/work - - chrome-grid: - image: selenium/standalone-chrome:91.0 - shm_size: 2gb - ports: - - "6900:5900" - - "4444" - - firefox-grid: - image: selenium/standalone-firefox:90.0 - shm_size: 2gb - ports: - - "6901:5900" - - "4444" - - -volumes: - results: - external: false - backend_results: - external: false diff --git a/docker-compose.yml b/docker-compose.yml index da85da7..041e7ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,12 +18,6 @@ services: - UI_TEST_HEADLESS=${UI_TEST_HEADLESS} - RERUN_COUNT=${RERUN_COUNT} - TEST_BROWSER=${TEST_BROWSER} - - RP_ENDPOINT=${RP_ENDPOINT} - - RP_UUID=${RP_UUID} - - RP_LAUNCH_ATTRIBUTES=${RP_LAUNCH_ATTRIBUTES} - - RP_PROJECT=${RP_PROJECT} - - RP_LAUNCH=${RP_LAUNCH} - - RP_LAUNCH_DESC=${RP_LAUNCH_DESC} - IMAGE_TAG=${IMAGE_TAG} - TEST_DEBUG=${TEST_DEBUG} env_file: @@ -57,7 +51,7 @@ services: tty: true environment: - SPLUNK_HEC_URL=https://splunk:8088 - - SPLUNK_HEC_TOKEN=9b741d03-43e9-4164-908b-e09102327d22 + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - SC4S_SOURCE_TLS_ENABLE=no - SC4S_DEST_SPLUNK_HEC_TLS_VERIFY=no - SC4S_LISTEN_JUNIPER_NETSCREEN_TCP_PORT=5000 @@ -89,6 +83,7 @@ services: environment: - PROXY_USER=splunk_socks5 - PROXY_PASSWORD=splunk_socks5 + splunk: build: context: . @@ -106,14 +101,8 @@ services: environment: - SPLUNK_PASSWORD=Chang3d! - SPLUNK_START_ARGS=--accept-license - - SPLUNK_HEC_TOKEN=9b741d03-43e9-4164-908b-e09102327d22 + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - TEST_SET=${TEST_SET} - - RP_ENDPOINT=${RP_ENDPOINT} - - RP_UUID=${RP_UUID} - - RP_LAUNCH_ATTRIBUTES=${RP_LAUNCH_ATTRIBUTES} - - RP_PROJECT=${RP_PROJECT} - - RP_LAUNCH=${RP_LAUNCH} - - RP_LAUNCH_DESC=${RP_LAUNCH_DESC} env_file: - test_credentials.env volumes: @@ -166,20 +155,6 @@ services: volumes: - results:/home/circleci/work - chrome-grid: - image: selenium/standalone-chrome-debug:91.0 - shm_size: 2gb - ports: - - "6900:5900" - - "4444" - - firefox-grid: - image: selenium/standalone-firefox-debug:90.0 - shm_size: 2gb - ports: - - "6901:5900" - - "4444" - volumes: results: external: false diff --git a/tests/entrypoint.sh b/tests/entrypoint.sh index 9af3b25..0f26cac 100755 --- a/tests/entrypoint.sh +++ b/tests/entrypoint.sh @@ -33,9 +33,6 @@ echo "Executing Tests..." RERUN_COUNT=${RERUN_COUNT:-1} if [ -z ${TEST_BROWSER} ] then - # echo Test Args $@ ${TEST_DEBUG} --reportportal -o "rp_endpoint=${RP_ENDPOINT}" -o "rp_launch_attributes=${RP_LAUNCH_ATTRIBUTES}" \ - # -o "rp_project=${RP_PROJECT}" -o "rp_launch=${RP_LAUNCH}" -o "rp_launch_description='${RP_LAUNCH_DESC}'" -o "rp_ignore_attributes='xfail' 'usefixture'" \ - # ${TEST_SET} echo Test Args $@ ${TEST_DEBUG} ${TEST_SET} @@ -45,10 +42,6 @@ then ${TEST_SET} test_exit_code=$? else - # pytest $@ ${TEST_DEBUG} \ - # --reportportal -o "rp_endpoint=${RP_ENDPOINT}" -o "rp_launch_attributes=${RP_LAUNCH_ATTRIBUTES}" \ - # -o "rp_project=${RP_PROJECT}" -o "rp_launch=${RP_LAUNCH}" -o "rp_launch_description='${RP_LAUNCH_DESC}'" -o "rp_ignore_attributes='xfail' 'usefixture'" \ - # ${TEST_SET} pytest $@ ${TEST_DEBUG} \ ${TEST_SET} test_exit_code=$? @@ -62,15 +55,6 @@ else # Execute the tests on Headless mode in local if UI_TEST_HEADLESS environment is set to "true" if [ "${UI_TEST_HEADLESS}" = "true" ] then - # echo Test Args $@ ${TEST_DEBUG} --local --persist-browser --headless --reruns=${RERUN_COUNT} --browser=${TEST_BROWSER}\ - # --reportportal -o "rp_endpoint=${RP_ENDPOINT}" -o "rp_launch_attributes=${RP_LAUNCH_ATTRIBUTES}" \ - # -o "rp_project=${RP_PROJECT}" -o "rp_launch=${RP_LAUNCH}" -o "rp_launch_description='${RP_LAUNCH_DESC}'" -o "rp_ignore_attributes='xfail' 'usefixture'" \ - # ${TEST_SET} - - # pytest $@ ${TEST_DEBUG} --local --persist-browser --headless --reruns=${RERUN_COUNT} --browser=${TEST_BROWSER} \ - # --reportportal -o "rp_endpoint=${RP_ENDPOINT}" -o "rp_launch_attributes=${RP_LAUNCH_ATTRIBUTES}" \ - # -o "rp_project=${RP_PROJECT}" -o "rp_launch=${RP_LAUNCH}" -o "rp_launch_description='${RP_LAUNCH_DESC}'" -o "rp_ignore_attributes='xfail' 'usefixture'" \ - # ${TEST_SET} pytest $@ ${TEST_DEBUG} --local --persist-browser --headless --reruns=${RERUN_COUNT} --browser=${TEST_BROWSER} \ ${TEST_SET} @@ -82,10 +66,6 @@ else echo "Sauce Connect Status:$sauce_connect_connection" [ "$sauce_connect_connection" -eq "4" ] && echo "SauceConnect is not running. Exiting the tests...." && exit 1 echo Test Args $@ ${TEST_DEBUG} --reruns=${RERUN_COUNT} --browser=${TEST_BROWSER} ${TEST_SET} - # pytest $@ ${TEST_DEBUG} --reruns=${RERUN_COUNT} --browser=${TEST_BROWSER} \ - # --reportportal -o "rp_endpoint=${RP_ENDPOINT}" -o "rp_launch_attributes=${RP_LAUNCH_ATTRIBUTES}" \ - # -o "rp_project=${RP_PROJECT}" -o "rp_launch=${RP_LAUNCH}" -o "rp_launch_description='${RP_LAUNCH_DESC}'" -o "rp_ignore_attributes='xfail' 'usefixture'" \ - # ${TEST_SET} pytest $@ ${TEST_DEBUG} --reruns=${RERUN_COUNT} --browser=${TEST_BROWSER} \ ${TEST_SET} test_exit_code=$?