citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
460 stars 137 forks source link

chore: Add final actions in test context #1231

Closed christophd closed 1 month ago

christophd commented 1 month ago

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()));
}