From 955de027f2b00222dcf2c83a07296528e595de91 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 25 Feb 2025 09:02:50 +0100 Subject: [PATCH 1/3] Move test_run_binary_application to 'upstream' tests Add support for testing 'test-upstream' RHEL7 is already obsoleted. Remove conditions Signed-off-by: Petr "Stone" Hracek --- .github/workflows/container-tests.yml | 2 +- test/run | 1 - test/run-upstream | 1 + test/test-lib-nodejs.sh | 35 +++++++++------------------ 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index c06232b1..23bd73d7 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -19,7 +19,7 @@ jobs: if: | github.event.issue.pull_request - && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]')) + && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-upstream]') || contains(github.event.comment.body, '[test-all]')) && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - uses: sclorg/tfaga-wrapper@main diff --git a/test/run b/test/run index 1104a421..434110d2 100755 --- a/test/run +++ b/test/run @@ -30,7 +30,6 @@ test_init_wrapper_false_development " TEST_LIST_BINARY="\ -test_run_binary_application test_node_cmd_development_init_wrapper_true " diff --git a/test/run-upstream b/test/run-upstream index 16a779ea..8c54d857 100755 --- a/test/run-upstream +++ b/test/run-upstream @@ -27,6 +27,7 @@ test_client_cloudevents test_client_fastify test_client_pino test_client_langchainjs +test_run_binary_application " readonly EXPRESS_REVISION="${EXPRESS_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show express version)}" diff --git a/test/test-lib-nodejs.sh b/test/test-lib-nodejs.sh index 1487f825..68f1cbeb 100644 --- a/test/test-lib-nodejs.sh +++ b/test/test-lib-nodejs.sh @@ -522,45 +522,32 @@ function test_dev_mode_true_development() { } function test_node_cmd_production_init_wrapper_false() { - if [ "$OS" != "rhel7" ]; then - # NODE_ENV=production INIT_WRAPPER=false NODE_CMD="node server.js" - test_node_cmd app production false "node server.js" - fi + test_node_cmd app production false "node server.js" } function test_node_cmd_development_init_wrapper_true() { - if [ "$OS" != "rhel7" ]; then - # NODE_ENV=development INIT_WRAPPER=true NODE_CMD="node server.js" - test_node_cmd app development true "node server.js" - fi + # NODE_ENV=development INIT_WRAPPER=true NODE_CMD="node server.js" + test_node_cmd app development true "node server.js" } function test_node_cmd_production_init_wrapper_true() { - if [ "$OS" != "rhel7" ]; then - # NODE_ENV=production INIT_WRAPPER=true NODE_CMD="node server.js" - test_node_cmd app production true "node server.js" - fi + # NODE_ENV=production INIT_WRAPPER=true NODE_CMD="node server.js" + test_node_cmd app production true "node server.js" } function test_node_cmd_development_init_wrapper_false() { - if [ "$OS" != "rhel7" ]; then - # NODE_ENV=development INIT_WRAPPER=false NODE_CMD="node server.js" - test_node_cmd app development false "node server.js" - fi + # NODE_ENV=development INIT_WRAPPER=false NODE_CMD="node server.js" + test_node_cmd app development false "node server.js" } function test_init_wrapper_true_development() { - if [ "$OS" != "rhel7" ]; then - # NODE_ENV=development INIT_WRAPPER=true - test_node_cmd app development true - fi + # NODE_ENV=development INIT_WRAPPER=true + test_node_cmd app development true } function test_init_wrapper_false_development() { - if [ "$OS" != "rhel7" ]; then - # NODE_ENV=development INIT_WRAPPER=true - test_node_cmd app development false - fi + # NODE_ENV=development INIT_WRAPPER=true + test_node_cmd app development false } function test_dev_mode_false_development() { From 99ebb9e6706e082787a03c212eafbcad9b39010e Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 26 Feb 2025 12:25:12 +0100 Subject: [PATCH 2/3] Add more traces to docker inspect Signed-off-by: Petr "Stone" Hracek --- test/test-lib-nodejs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-lib-nodejs.sh b/test/test-lib-nodejs.sh index 68f1cbeb..8c7aed50 100644 --- a/test/test-lib-nodejs.sh +++ b/test/test-lib-nodejs.sh @@ -26,7 +26,7 @@ check_prep_result() { } image_exists() { - docker inspect $1 &>/dev/null + docker inspect $1 } container_exists() { From 92f4e739b22e1046804fba7cc0d20db4ae986bd0 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 26 Feb 2025 12:26:40 +0100 Subject: [PATCH 3/3] Redirect docker inspect output to /dev/null Signed-off-by: Petr "Stone" Hracek --- test/test-lib-nodejs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-lib-nodejs.sh b/test/test-lib-nodejs.sh index 8c7aed50..b9f00b21 100644 --- a/test/test-lib-nodejs.sh +++ b/test/test-lib-nodejs.sh @@ -26,7 +26,7 @@ check_prep_result() { } image_exists() { - docker inspect $1 + docker inspect $1 1>/dev/null } container_exists() {