1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-09 11:14:29 +02:00
unleash.unleash/src/test/fixtures
Christopher Kolstad 6c6001619c
Feat/variant api (#1119)
Add a new .../:feature/variants API

This adds
- `GET /api/admin/projects/:projectId/features/:featureName/variants` which returns 
```json
{ version: '1', variants: IVariant[] }
```
- `PATCH /api/admin/projects/:projectId/features/:featureName/variants` which accepts a json patch set and updates the feature's variants field and then returns 
```json
{ version: '1', variants: IVariant[] }
```
- `PUT /api/admin/projects/:projectId/features/:featureName/variants`
 which accepts a IVariant[] and overwrites the current variants list for the feature defined in :featureName and returns
```json
{ version: '1', variants: IVariant[] }

- This also makes sure the total weight of all variants is == 1000
- Validates that there is at least 1 'variable' variant if there are variants
- Validates that 'fix' variants total weight can't exceed 1000
- Adds tests for all these invariants.


Co-authored-by: Simon Hornby <simon@getunleash.ai>
2021-11-24 13:08:04 +01:00
..
access-service-mock.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-access-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-addon-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-api-token-store.ts Feat/api key scoping (#941) 2021-09-15 20:28:10 +02:00
fake-client-applications-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-client-instance-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-client-metrics-store-v2.ts feat/metricsV2 (#1005) 2021-10-08 10:09:22 +02:00
fake-client-metrics-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-context-field-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-environment-store.ts task: remove displayName from environments (#988) 2021-09-29 10:23:43 +02:00
fake-event-store.ts feat: clean up events (#1089) 2021-11-12 13:15:51 +01:00
fake-feature-environment-store.ts fix: Only trigger environment enabled/disabled events if different f… (#1053) 2021-10-21 22:33:50 +02:00
fake-feature-strategies-store.ts Fix/feature strategies needs project update (#1040) 2021-10-19 09:49:43 +02:00
fake-feature-tag-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-feature-toggle-client-store.ts fix: Cleanup new features API with env support (#929) 2021-09-13 10:23:57 +02:00
fake-feature-toggle-store.ts Feat/variant api (#1119) 2021-11-24 13:08:04 +01:00
fake-feature-type-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-project-store.ts fix: Cleanup new features API with env support (#929) 2021-09-13 10:23:57 +02:00
fake-reset-token-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-session-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-setting-store.ts feat: Disable password based login (#1046) 2021-10-29 10:25:42 +02:00
fake-strategies-store.ts fix: import should not drop built-in strategies 2021-08-26 22:41:51 +02:00
fake-tag-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-tag-type-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-user-feedback-store.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
fake-user-splash-store.ts fix: styling 2021-11-09 20:55:23 +01:00
fake-user-store.ts fix: add user and project counters 2021-08-27 10:10:14 +02:00
no-logger.ts fix: Stores as typescript and with interfaces. (#902) 2021-08-12 15:04:37 +02:00
permissions.ts fix: convert files to typescript 2021-09-14 19:30:11 +02:00
store.ts fix: add migration 2021-11-09 11:52:02 +01:00