Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testsuite seems to be passing, even though a specific tests fails. #537

Open
zmiklank opened this issue Nov 21, 2023 · 2 comments
Open

Testsuite seems to be passing, even though a specific tests fails. #537

zmiklank opened this issue Nov 21, 2023 · 2 comments
Assignees

Comments

@zmiklank
Copy link
Contributor

          Strange behaviour.

There is an error in test/run script:

-----------------------------------------------
Running test run_pgaudit_test (starting at 2023-10-03 10:26:59+00:00) ... 
-----------------------------------------------
c644c8223c59eb64a932a2d1cd2e13e9f3bee4a1c7fd79ec69e1df6e37a788c0
Created container c644c8223c59eb64a932a2d1cd2e13e9f3bee4a1c7fd79ec69e1df6e37a788c0
test/run: line 340: $1: unbound variable
Tests finished with EXIT=1

Tests are passing:

==============================================
Tests were run for image quay.io/sclorg/postgresql-15-c9s:1
==============================================
Test cases results:

 [PASSED] for 'postgresql-container_tests' run_container_creation_tests (00:00:19)
 [PASSED] for 'postgresql-container_tests' run_general_tests (00:00:39)
 [PASSED] for 'postgresql-container_tests' run_change_password_test (00:00:07)
 [PASSED] for 'postgresql-container_tests' run_replication_test (00:00:06)
 [PASSED] for 'postgresql-container_tests' run_doc_test (00:00:00)
 [PASSED] for 'postgresql-container_tests' run_s2i_test (00:00:14)
 [PASSED] for 'postgresql-container_tests' run_test_cfg_hook (00:00:08)
 [PASSED] for 'postgresql-container_tests' run_s2i_bake_data_test (00:00:12)
 [PASSED] for 'postgresql-container_tests' run_s2i_enable_ssl_test (00:00:08)
 [PASSED] for 'postgresql-container_tests' run_upgrade_test (00:00:00)
 [PASSED] for 'postgresql-container_tests' run_migration_test (00:00:23)

Originally posted by @phracek in #399 (comment)

@zmiklank
Copy link
Contributor Author

It is little bit confusing what the log line Tests finished with EXIT=1 is saying to us.
In reality it means, that the exit code of the test script was not zero, however, this does not mean, that the TESTSUITE_RESULT was success or that the tests finished successfully.
I do not see the results of run_pgaudit_test in the logs that Peto has found. That could mean, that unbound variable led to exiting the whole testsuite even before the test result itself was recorded.
This is not really bad behaviour, unfortunately from the log I can not see, if the overal test results were green or red. Everything leads to conclusion that they were red - so I consider this behaviour to be at least partly correct.

What can we do in order to increase readibility of the logs:

  • change sentence Tests finished with EXIT=1 to something like Tests finished unexpectedly with EXIT=1
  • do not exit test script on unbound variable, just fail the specific testcase if this happens.

From my POV this problem does not have high priority.
@phracek Do you want to add something?

@phracek
Copy link
Member

phracek commented Sep 4, 2024

@SlouchyButton It looks like you are the expert for this issue. As you did it in s2i-ruby-container and s2i-nodejs-container. If you do not have time, I will fix it.

SlouchyButton added a commit to SlouchyButton/postgresql-container that referenced this issue Oct 8, 2024
Initially command `test was missing`, but after it was added
test failed and crashed in a way that no more tests were run.
This behavior is known issue tracked here in issue sclorg#537

Problem is that `DOCKER_EXTRA_ARGS` variable is set already
which it shouldn't be, so the `test` command returns 0,
so no `cp` happens and we get the crash.

Variable is empty, but apparently do exist as
`test -v DOCKER_EXTRA_ARGS` is `TRUE`.

Introduced by PR sclorg#399
phracek pushed a commit that referenced this issue Oct 9, 2024
Initially command `test was missing`, but after it was added
test failed and crashed in a way that no more tests were run.
This behavior is known issue tracked here in issue #537

Problem is that `DOCKER_EXTRA_ARGS` variable is set already
which it shouldn't be, so the `test` command returns 0,
so no `cp` happens and we get the crash.

Variable is empty, but apparently do exist as
`test -v DOCKER_EXTRA_ARGS` is `TRUE`.

Introduced by PR #399
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants