1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00
unleash.unleash/src/test/e2e
Gastón Fournier 4e0678dfb1
fix: allow empty appName as it may come in the url (#3953)
## About the changes
Edit application under
https://app.unleash-hosted.com/demo/applications/test-app is currently
not working as the appName is expected to come in the request body, but
it's actually part of the url. We have two options here:
1. We change the UI to adapt to the expectations of the request by
adding appName to the request body (and eventually removing appName from
the URL, which would be a breaking change)
2. We remove the restriction of only sending the appName in the body and
take the one that comes in the URL. We have a validation that verifies
that at least one of the two sets the appName
([here](e376088668/src/lib/services/client-metrics/instance-service.ts (L208))
we validate using [this
schema](e376088668/src/lib/services/client-metrics/schema.ts (L55-L70)))

In terms of REST API, we can assume that the appName will be present in
the resource `/api/admin/metrics/applications` (an endpoint we don't
have), but when we're updating an application we should refer to that
application by its URL: `/api/admin/metrics/applications/<appName>` and
the presence of an appName in the body might indicate that we're trying
to change the name of the application (something we currently not
support)

Based on the above, I believe going with the second option is best, as
it adheres to REST principles and does not require a breaking change.
Despite that, we only support updating applications as the creation is
done from metrics ingestion

Fixes: #3580
2023-06-12 10:15:00 +02:00
..
api fix: allow empty appName as it may come in the url (#3953) 2023-06-12 10:15:00 +02:00
helpers chore: migrations test (#3590) 2023-04-24 10:59:12 +03:00
routes Wip/environments (#880) 2021-07-07 10:46:50 +02:00
seed fix: seed setup and remove admin/features call (#3567) 2023-04-20 11:37:56 +02:00
services refactor: playground in feature oriented architecture (#3942) 2023-06-09 12:55:54 +02:00
stores fix: return 404 when gettings tags for a non existing feature (#3560) 2023-04-19 14:10:13 +02:00
custom-auth.test.ts Favorite features (#2550) 2022-11-29 16:06:08 +01:00
health.e2e.test.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
migrator.e2e.test.ts feat: metrics for variants (#3685) 2023-05-05 11:10:54 +03:00