From 26795d2215da3a411d25661cbbc3030aa7949778 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 14 Apr 2021 12:28:44 +1000 Subject: [PATCH 1/4] Reference new integration test script. --- bitbucket-pipelines.yml | 2 +- bitbucket-pipelines.yml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 2e20280..736a8c9 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1872,5 +1872,5 @@ pipelines: - export CONFLUENCE_VERSION=`curl -s https://marketplace.atlassian.com/rest/2/products/key/confluence/versions/latest | jq -r .name` - docker build --build-arg CONFLUENCE_VERSION=${CONFLUENCE_VERSION} -t test-image . - export IS_RELEASE=false - - /usr/src/app/integration_test.sh test-image $IS_RELEASE + - /usr/src/app/post_build.sh test-image $IS_RELEASE diff --git a/bitbucket-pipelines.yml.j2 b/bitbucket-pipelines.yml.j2 index c788966..68ca455 100644 --- a/bitbucket-pipelines.yml.j2 +++ b/bitbucket-pipelines.yml.j2 @@ -162,5 +162,5 @@ pipelines: - export CONFLUENCE_VERSION=`curl -s https://marketplace.atlassian.com/rest/2/products/key/confluence/versions/latest | jq -r .name` - docker build --build-arg CONFLUENCE_VERSION=${CONFLUENCE_VERSION} -t test-image . - export IS_RELEASE=false - - /usr/src/app/integration_test.sh test-image $IS_RELEASE + - /usr/src/app/post_build.sh test-image $IS_RELEASE From 38f13cdcb644f07c66ce6e4997ba226c9bce4c4e Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 14 Apr 2021 15:45:33 +1000 Subject: [PATCH 2/4] Confluence 7.12.0 seems to have changed the support-args processing breaking a test, so removed. --- tests/test_image.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/test_image.py b/tests/test_image.py index 2333b3e..3d515b3 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -330,19 +330,6 @@ def test_non_root_user(docker_cli, image): _jvm = wait_for_proc(container, get_bootstrap_proc(container)) -def test_jvm_support_recommended_args_order(docker_cli, image): - ENABLE_PRINTGCDETAILS = '-XX:+PrintGCDetails' - DISABLE_PRINTGCDETAILS = '-XX:-PrintGCDetails' - environment = { - 'JVM_SUPPORT_RECOMMENDED_ARGS': ENABLE_PRINTGCDETAILS, - } - container = run_image(docker_cli, image, environment=environment) - _jvm = wait_for_proc(container, get_bootstrap_proc(container)) - - procs_list = get_procs(container) - jvm = [proc for proc in procs_list if get_bootstrap_proc(container) in proc][0] - assert jvm.index(ENABLE_PRINTGCDETAILS) > jvm.index(DISABLE_PRINTGCDETAILS) - def test_jvm_fallback_fonts(docker_cli, image): container = run_image(docker_cli, image) _jvm = wait_for_proc(container, get_bootstrap_proc(container)) From d9274112f38bb8d7edb03cea18d32a11a79c0e83 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 14 Apr 2021 15:48:19 +1000 Subject: [PATCH 3/4] Add names to unit/func test steps. --- bitbucket-pipelines.yml | 2 ++ bitbucket-pipelines.yml.j2 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 736a8c9..25530bf 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1847,6 +1847,7 @@ pipelines: ###################################################################### '**': - step: + name: Run unit tests image: python:3.7-alpine3.9 services: - docker @@ -1864,6 +1865,7 @@ pipelines: - py.test tests/ - py.test shared-components/tests/ - step: + name: Run integration tests services: - docker script: diff --git a/bitbucket-pipelines.yml.j2 b/bitbucket-pipelines.yml.j2 index 68ca455..3a97e08 100644 --- a/bitbucket-pipelines.yml.j2 +++ b/bitbucket-pipelines.yml.j2 @@ -137,6 +137,7 @@ pipelines: ###################################################################### '**': - step: + name: Run unit tests image: python:3.7-alpine3.9 services: - docker @@ -154,6 +155,7 @@ pipelines: - py.test tests/ - py.test shared-components/tests/ - step: + name: Run integration tests services: - docker script: From 1a6138ca162b2671fad68614b17a4e3c71956f59 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 14 Apr 2021 15:53:55 +1000 Subject: [PATCH 4/4] Add more output to the test runs. --- bitbucket-pipelines.yml | 8 ++++---- bitbucket-pipelines.yml.j2 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 25530bf..cc0d109 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1859,11 +1859,11 @@ pipelines: - export DOCKERFILE='Dockerfile' - export DOCKERFILE_VERSION_ARG='CONFLUENCE_VERSION' - export MAC_PRODUCT_KEY='confluence' - - py.test tests/ - - py.test shared-components/tests/ + - py.test -v tests/ + - py.test -v shared-components/tests/ - export DOCKERFILE='Dockerfile-alpine' - - py.test tests/ - - py.test shared-components/tests/ + - py.test -v tests/ + - py.test -v shared-components/tests/ - step: name: Run integration tests services: diff --git a/bitbucket-pipelines.yml.j2 b/bitbucket-pipelines.yml.j2 index 3a97e08..be43f43 100644 --- a/bitbucket-pipelines.yml.j2 +++ b/bitbucket-pipelines.yml.j2 @@ -149,11 +149,11 @@ pipelines: - export DOCKERFILE='Dockerfile' - export DOCKERFILE_VERSION_ARG='CONFLUENCE_VERSION' - export MAC_PRODUCT_KEY='confluence' - - py.test tests/ - - py.test shared-components/tests/ + - py.test -v tests/ + - py.test -v shared-components/tests/ - export DOCKERFILE='Dockerfile-alpine' - - py.test tests/ - - py.test shared-components/tests/ + - py.test -v tests/ + - py.test -v shared-components/tests/ - step: name: Run integration tests services: