Repository navigation
feat: add "GET /services/types" - #11
Conversation
| with app.app_context(): | ||
| res = getServiceTypes.__wrapped__() | ||
| assert res == [] | ||
| # All written services have same type, we expect list of length 1 |
There was a problem hiding this comment.
Is this test enough or do we need to test for different types?
There was a problem hiding this comment.
Was first leaning to no, but now leaning to yes. Could be that someone refactors the controller in a way that it, e.g., always only returns a list of length 1 (e.g., the first or last service). We wouldn't have a test to catch this then. So yeah, would be good to have a test where two different services are returned. So can just copy this test and change the org or artifact for each, then check that the length of the returned services equals the length of the input list.
uniqueg
left a comment
There was a problem hiding this comment.
Would just add the test you asked about. Otherwise it's perfect! :)
| with app.app_context(): | ||
| res = getServiceTypes.__wrapped__() | ||
| assert res == [] | ||
| # All written services have same type, we expect list of length 1 |
There was a problem hiding this comment.
Was first leaning to no, but now leaning to yes. Could be that someone refactors the controller in a way that it, e.g., always only returns a list of length 1 (e.g., the first or last service). We wouldn't have a test to catch this then. So yeah, would be good to have a test where two different services are returned. So can just copy this test and change the org or artifact for each, then check that the length of the returned services equals the length of the input list.
getServiceTypescontroller for endpointGET /services/typesResolves #3