mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
5b66346e56
## 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. |
||
---|---|---|
.. | ||
access-service-mock.ts | ||
fake-access-store.ts | ||
fake-addon-store.ts | ||
fake-api-token-store.ts | ||
fake-client-applications-store.ts | ||
fake-client-instance-store.ts | ||
fake-client-metrics-store-v2.ts | ||
fake-context-field-store.ts | ||
fake-environment-store.ts | ||
fake-event-store.ts | ||
fake-favorite-features-store.ts | ||
fake-favorite-projects-store.ts | ||
fake-feature-environment-store.ts | ||
fake-feature-strategies-store.ts | ||
fake-feature-tag-store.ts | ||
fake-feature-toggle-client-store.ts | ||
fake-feature-toggle-store.ts | ||
fake-feature-type-store.ts | ||
fake-group-store.ts | ||
fake-pat-store.ts | ||
fake-project-store.ts | ||
fake-public-signup-store.ts | ||
fake-reset-token-store.ts | ||
fake-role-store.ts | ||
fake-segment-store.ts | ||
fake-session-store.ts | ||
fake-setting-store.ts | ||
fake-strategies-store.ts | ||
fake-tag-store.ts | ||
fake-tag-type-store.ts | ||
fake-user-feedback-store.ts | ||
fake-user-splash-store.ts | ||
fake-user-store.ts | ||
no-logger.ts | ||
permissions.ts | ||
store.ts |