ARO-RP/test/database
Kipp Morris 31c72522fe
MIWI API endpoints (#3608)
* Add Cosmos DB container for PlatformWorkloadIdentityRoleSets

* Revert change to AKS k8s version - committed by mistake

* Fix bug in converter

When I first wrote the converter, I thought Go would treat the the slice
we `make` few lines above these changes as a slice full of zero-value
structs, but it actually treats it as an empty slice, which led to
out-of-bound issues when I first tried to use this converter to work on
the API endpoints.

* Add the PlatformWorkloadIdentityRoleSetConverter to the API register

* Implement the change feed for role sets in the easiest, most naive way

* Implement the external API endpoint for listing role sets

* Fix a small oversight from earlier on

* Add unit tests for the list endpoint

* Add unit tests for changefeed changes

* Uncomment the static validator

* Fix more slice out of bounds bugs in the converters...

* Add converter and static validator to the admin API register

* Add list and put endpoints

* Fix name of function to match convention

* Fix bug in static validator

I originally wrote the code the way I did so that we could aggregate
errors so that we could provide a better UX in cases where there are
multiple similar errors in the request content. I found while writing
unit tests that aggregating the errors in this way and not wrapping them
in a CloudError causes the RP to return an internal server error instead
of a 400 bad request.

Is there a way we can aggregate the errors and still wrap them in a
CloudError? I'm not sure of the formatting requirements for the text of
CloudErrors.

* Add unit tests for new API endpoints

* Fix typo

* Appease the linter

* Appease the linter

* Add TODO comment re: the number of parameters

* Update static validator to return multiple validation issues at the same time where applicable for better UX

* Add a simple utility function to make semver comparisons of OpenShift minor version more readable

* Log error before returning 500 to user

* Log errors before returning 500 to user

* Improve naming of unit test cases

* Add additional unit test cases
2024-06-06 10:15:44 -04:00
..
aead.go Rotate the encryption secrets on deploy (#1645) 2021-12-01 10:14:11 +00:00
aead_test.go renames: 2020-12-14 11:18:57 -06:00
billing.go Add a fake cosmosdb backend (functional changes) 2020-09-24 16:13:58 +10:00
check.go MIWI API endpoints (#3608) 2024-06-06 10:15:44 -04:00
clustermanager.go wip testcase 2022-09-26 11:55:19 -07:00
collection.go Add a fake cosmosdb backend (functional changes) 2020-09-24 16:13:58 +10:00
deepcopy.go deep copy items when adding them to database checkers/fixtures 2020-12-09 16:22:52 -06:00
fixtures.go MIWI API endpoints (#3608) 2024-06-06 10:15:44 -04:00
inmemory.go MIWI API endpoints (#3608) 2024-06-06 10:15:44 -04:00
openshiftclusters.go Fix string to int conversion 2023-09-03 18:29:27 -07:00
subscriptions.go lint fixes 2020-11-19 08:09:59 -06:00