1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/test/e2e/services
Christopher Kolstad 5b66346e56
fixes 2-456: Preserve all data from strategy import (#2720)
## What
Previously when importing strategies we've used the same data type we've
used for creating strategies (the minimal, a name, an optional
description, optional parameters and an optional editable column). This
meant that exporting strategies and then importing them would reactivate
deprecated strategies. This PR changes to allow the import to preserve
all the data coming in the export file.

## Tests
Added four new tests, two new unit tests using our fake stores and two
new e2e tests. Interestingly the ones in the fake store ran green before
this change as well, probably because we just insert the parsed json
object in the fake store, whereas the real store actually converts the
object from camelCasing to the postgresql snake_casing standard.

## Discussion points:
### Mismatch between fake and real stores
This is inevitable since storing things in javascript arrays vs saving
in a real database will have some differences, but this again shows the
value of our e2e tests.

### Invariants
Should we see if we can add some invariants to our import/export so that
we can write some proptests for it? One candidate is commutativity of
import/export. On a fresh database importing and then exporting should
yield the same file that was imported provided all flags are turned on.
Candidate for Q1 improvement of import/export.
2022-12-21 13:33:41 +01:00
..
access-service.e2e.test.ts
addon-service.e2e.test.ts
api-token-service.e2e.test.ts task: Make operations on the API Token store auditable. (#2531) 2022-11-28 10:56:34 +01:00
client-metrics-service.e2e.test.ts task: Expose prometheus metrics (#2586) 2022-12-12 14:05:56 +01:00
environment-service.test.ts Favorite features (#2550) 2022-11-29 16:06:08 +01:00
feature-toggle-service-v2.e2e.test.ts Favorite features (#2550) 2022-11-29 16:06:08 +01:00
group-service.e2e.test.ts Fix all groups being removed, even when no external groups were defined (#2197) 2022-10-17 11:44:36 +03:00
last-seen-service.e2e.test.ts fix: filter empty metrics before we collect last seen toggles. (#2172) 2022-10-17 09:06:59 +02:00
playground-service.test.ts feat: Add variants per env (#2471) 2022-11-21 10:37:16 +01:00
project-health-service.e2e.test.ts Favorite project (#2569) 2022-11-30 13:41:53 +02:00
project-service.e2e.test.ts Favorite features (#2550) 2022-11-29 16:06:08 +01:00
reset-token-service.e2e.test.ts
session-service.e2e.test.ts
setting-service.test.ts
state-service.e2e.test.ts fixes 2-456: Preserve all data from strategy import (#2720) 2022-12-21 13:33:41 +01:00
user-service.e2e.test.ts Add possibility to soft delete users (#2497) 2022-11-23 09:30:54 +02:00