CDRIVER-4183 re-enable CSE tests on RHEL #882
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
This is a followup to CDRIVER-3927, which disabled CSE tests on RHEL due to inability to register the CA certificate required by KMS TLS tests on the system. This PR re-enables CSE tests on RHEL and proposes a workaround that selectively disables KMS TLS tests on CA certificate registration failure via the
MONGOC_TEST_SKIP_KMS_TLS_TESTSenvironment variable.This PR comes in five parts:
MONGOC_TEST_SKIP_KMS_TLS_TESTS.This is done via the
test_framework_skip_kms_tls_tests()function which checks for the presence and value of theMONGOC_TEST_SKIP_KMS_TLS_TESTSenvironment variable. This variable is also documented in CONTRIBUTING.md.CA certificate registration routines on Linux now define the
MONGOC_TEST_SKIP_KMS_TLS_TESTSenvironment variable if it detects that the certificate could not be registered. This primarily applies to RHEL variants, which are awaiting resolution of BUILD-14068.MacOS was overlooked during implementation and testing of CDRIVER-3927.
It is possible for tests to run before the mock KMS servers, which are started in the background, have had time to completed their startup procedures. This can lead to false-positive KMS TLS tests failures. The
wait_for_kms_serverfunction gives the mock KMS servers up to 60 seconds before aborting the script/task.This undoes the changes made in 33c8d31 in variants.py.