Feature: Delete an ApiDefinition
Scenario: Deleting an ApiDefinition when a SecurityPolicy grants access to it
Given I have a protected ApiDefinition
And I have a SecurityPolicy which grants access to it
When I delete the ApiDefinition
Then The ApiDefinition reconciler should return an error and requeue the request
kubectl delete apidefinitions.tyk.tyk.io httpbin
apidefinition.tyk.tyk.io "httpbin" deleted <----------- This should actually be blocked by the finalizer, which should requeue till the SecurityPolicy object is also deleted, or the apidefinition is de-referenced.
Issue occurs on v0.6.0
helm list -A | grep operator
tyk-operator tykpro 1 2021-04-13 12:49:20.008365 +0100 BST deployed tyk-operator-0.6.0
Step 1: Create the Tyk API
Step 2: Create the SecurityPolicy
Step 3: Delete the api defintion
Issue occurs on v0.6.0