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

tests: Use unique zone hostnames for each integration test #226

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

mikenairn
Copy link
Member

@mikenairn mikenairn commented Sep 11, 2024

The integration test suite uses the inmemory provider which is shared across all test specs. This works fine if a record is created and deleted successfully very quickly as the records in the provider(memory) will be removed, but if for any reason they aren't (secret gets removed before the record has completed its deletion reconcile for instance) they can be left behind and cause odd issues with other tests that are using the same hostname.

The changes here update the integration test suite to:

  • Use a generated zone/hostname unique for each single test, this is similar in approach to the current e2e tests.
  • Remove all cleanup logic from the integration test suite for record and secrets(providers). Alternative would be to wait for each deletion to complete before allowing it to continue but this could add significant amount of time to each test for little gain. Tests that explicitly test the deletion logic already exist in the integration and e2e suites.

The integration test suite uses the inmemory provider which is shared
across all test specs. This works fine if a record is created and
deleted successfully very quickly as the records in the provider will be
removed, but if for any reason they aren't (secret gets removed before
the record has completed its deletion reconcile for instance) they can
be left behind and cause odd issues with other tests that are using the
same hostname.

The changes here update the integration test suite to:
* Use a generated zone/hostname unique for each single test, this is
  similar in approach to the current e2e tests.
* Remove all cleanup logic from the integration test suite for record
  and secrets(providers). Alternative would be to wait for each deletion
to complete before allowing it to continue but this could add
significant amount of time to each test for little gain. Tests that
explicitly test the deletion logic already exist in the integration and
e2e suits.

Signed-off-by: Michael Nairn <mnairn@redhat.com>
Copy link
Contributor

@maleck13 maleck13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@mikenairn mikenairn added this pull request to the merge queue Sep 12, 2024
Merged via the queue into Kuadrant:main with commit f6813d5 Sep 12, 2024
15 checks passed
@mikenairn mikenairn deleted the fix_integration_tests branch September 12, 2024 08:16
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

Successfully merging this pull request may close these issues.

2 participants