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

chore: Add final actions in test context #1231

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

christophd
Copy link
Member

  • Provide the opportunity to add actions in test context that get run at the end of the test
  • Enables test actions to dynamically add cleanup actions for instance when auto removing created resources after a test

Used in Knative and Kubernetes test actions to auto remove created resources after the test.

if (isAutoRemoveResources()) {
    context.doFinally(kubernetes().client(getKubernetesClient())
            .secrets()
            .delete(created.getMetadata().getName())
            .inNamespace(getNamespace()));
}

- Provide the opportunity to add actions in test context that get run at the end of the test
- Enables test actions to dynamically add cleanup actions for instance when auto removing created resources after a test
- Used in Knative and Kubernetes test actions to auto remove created resources after the test
@christophd christophd merged commit 15b0cf0 into main Oct 10, 2024
1 check passed
@bbortt bbortt deleted the chore/auto-remove-resources branch October 10, 2024 06:49
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.

1 participant