[FIX] ignore 404 when deleting an API, fixes #469#541
[FIX] ignore 404 when deleting an API, fixes #469#541singhpr merged 20 commits intoTykTechnologies:masterfrom patriziobruno:bugfix/delete-api-not-found
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? |
buraksekili
left a comment
There was a problem hiding this comment.
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.
buraksekili
left a comment
There was a problem hiding this comment.
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
ApiDefinitionCRget stuck when API-definition has been deleted using the dashboard.Test Coverage For This Change
tyk-operatortyk-operatortyk-operatorremoved the api-definitionCRTypes of changes
Checklist
master!masterbranch (left side). Also, it would be best if you started your change off our latestmaster.make manifestsmake helmgofmt -s -w .go vet ./...golangci-lint run