-
Notifications
You must be signed in to change notification settings - Fork 42
[FIX] ignore 404 when deleting an API, fixes #469 #541
[FIX] ignore 404 when deleting an API, fixes #469 #541
Conversation
Can you add tests for this scenario? |
UPDATE: never mind, I figured it out @komalsukhani I could if I knew how to call the test dashboard-api to delete the API before tyk-operator can. Any pointers on how to call dashboard-api from within the BDD context? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great to me! thank you @patriziobruno !
I would like to explain something about current bdd
tests. At the moment, it is not able to use Dashboard API. It only uses Gateway API. That's why adding a step about dashboard API won't help in bdd tests. So, can you please update your tests; so that it only uses Gateway API instead of Dashboard API?
Moreover, We decided to move with Venom tests instead of bdd tests. In the future, our plan is to migrate bdd tests to Venom gradually. Sorry for the confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM unless anyone else has any opinions! Once QA finishes testing this PR, we can merge it for the next release. thank you for your great effort @patriziobruno !
Thanks for the contribution @patriziobruno ! The change is now merged and will be included in the next release targeted at early Jan. |
* ignore 404 when deleting an API, fixes #469 * Update CHANGELOG.md * typo * check for 404 error using tykclient.IsNotFound * move change mention to Unreleased * add bdd test scenario for deleting ApiDefinition not present in dashboard * use a separate sample resource to test deletion of deleted apis * fix linter * fix createDashURL * fix ::set-output warnings * fix typos in feature files * make bdd tests more reliable * fix actionlint errors * use gateway-api for deletion bdd test * disable bdd strict * change order of bdd example resources * split apidefinition from context to fix test * typos * fix test * (re)disable the failing test
Ignore not-found error when attempting to delete an API.
Related Issue
#469
Motivation and Context
ApiDefinition
CR
get stuck when API-definition has been deleted using the dashboard.Test Coverage For This Change
tyk-operator
tyk-operator
tyk-operator
removed the api-definitionCR
Types of changes
Checklist
master
!master
branch (left side). Also, it would be best if you started your change off our latestmaster
.make manifests
make helm
gofmt -s -w .
go vet ./...
golangci-lint run