Skip to content

Commit

Permalink
Merge pull request #975 from navikt/feature/toggle-create-mellomlagring
Browse files Browse the repository at this point in the history
Feature/toggle create mellomlagring
  • Loading branch information
magnurh-cx authored Jan 19, 2024
2 parents fd30dc3 + 464f64b commit cd33216
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .nais/fyllut/dev-delingslenke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ app-name: skjemautfylling-delingslenke
ingresses:
- "https://skjemadelingslenke.ekstern.dev.nav.no/fyllut"
fyllut-frontend-url: "https://skjemadelingslenke.ekstern.dev.nav.no/fyllut"
enabled-features: translations,autoComplete,sendInnIntegration,mellomlagring
enabled-features: translations,autoComplete,sendInnIntegration,mellomlagring=true,createMellomlagring=true
foersteside-url: https://www.nav.no/soknader/api/forsteside
dekorator-url: https://www.nav.no/dekoratoren?simple=true
skjemabygging-proxy-client-id: 95170319-b4d7-4190-8271-118ed19bafbf
Expand Down
2 changes: 1 addition & 1 deletion .nais/fyllut/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ app-name: skjemautfylling
ingresses:
- "https://skjemautfylling-formio.intern.dev.nav.no/fyllut"
fyllut-frontend-url: "https://skjemautfylling-formio.intern.dev.nav.no/fyllut"
enabled-features: translations,sendInnIntegration
enabled-features: translations,sendInnIntegration,mellomlagring=false,createMellomlagring=true
foersteside-url: https://www.nav.no/soknader/api/forsteside
dekorator-url: https://www.nav.no/dekoratoren?simple=true
skjemabygging-proxy-client-id: 95170319-b4d7-4190-8271-118ed19bafbf
Expand Down
2 changes: 1 addition & 1 deletion .nais/fyllut/preprod-alt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ app-name: skjemautfylling-preprod-alt
ingresses:
- "https://fyllut-preprod-alt.intern.dev.nav.no/fyllut"
fyllut-frontend-url: "https://fyllut-preprod-alt.intern.dev.nav.no/fyllut"
enabled-features: translations,sendInnIntegration
enabled-features: translations,sendInnIntegration,mellomlagring=false,createMellomlagring=true
foersteside-url: https://www.nav.no/soknader/api/forsteside
dekorator-url: https://www.nav.no/dekoratoren?simple=true
skjemabygging-proxy-client-id: 95170319-b4d7-4190-8271-118ed19bafbf
Expand Down
2 changes: 1 addition & 1 deletion .nais/fyllut/preprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ app-name: skjemautfylling-preprod
ingresses:
- "https://fyllut-preprod.intern.dev.nav.no/fyllut"
fyllut-frontend-url: "https://fyllut-preprod.intern.dev.nav.no/fyllut"
enabled-features: translations,sendInnIntegration,mellomlagring
enabled-features: translations,sendInnIntegration,mellomlagring=true,createMellomlagring=true
foersteside-url: https://www.nav.no/soknader/api/forsteside
dekorator-url: https://www.nav.no/dekoratoren?simple=true
skjemabygging-proxy-client-id: 95170319-b4d7-4190-8271-118ed19bafbf
Expand Down
2 changes: 1 addition & 1 deletion .nais/fyllut/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ app-name: skjemautfylling
ingresses:
- "https://www.nav.no/fyllut"
fyllut-frontend-url: "https://www.nav.no/fyllut"
enabled-features: translations,autoComplete,sendInnIntegration
enabled-features: translations,autoComplete,sendInnIntegration,mellomlagring=false,createMellomlagring=true
foersteside-url: https://www.nav.no/soknader/api/forsteside
dekorator-url: https://www.nav.no/dekoratoren?simple=true
skjemabygging-proxy-client-id: 031863f2-9881-44af-ace5-6b5ab52afeb1
Expand Down
2 changes: 1 addition & 1 deletion packages/fyllut-backend/.env.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ENABLED_FEATURES="translations,mellomlagring,sendInnIntegration"
ENABLED_FEATURES="translations,sendInnIntegration,mellomlagring=true,createMellomlagring=true"
SKJEMABYGGING_PROXY_CLIENT_ID=564s78e2-d6k3-3564-1564-554ed32bafwf
SKJEMABYGGING_PROXY_URL=http://127.0.0.1:3300/skjemabygging-proxy
AZURE_OPENID_CONFIG_TOKEN_ENDPOINT=http://127.0.0.1:3300/azure-openid/oauth2/v2.0/token
Expand Down
2 changes: 1 addition & 1 deletion packages/fyllut-backend/src/test/test.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AZURE_OPENID_CONFIG_TOKEN_ENDPOINT=http://azureopenid-token-test.nav.no/c76419c0
AZURE_APP_CLIENT_ID=fyllut-client-id
FORMS_SOURCE=formioapi
NAIS_CLUSTER_NAME=local-cluster
ENABLED_FEATURES=translations,sendInnIntegration,mellomlagring
ENABLED_FEATURES=translations,sendInnIntegration,mellomlagring=true,createMellomlagring=true"
SEND_INN_HOST=https://innsending-api.unittest.nav.no
SEND_INN_TOKEN_X_CLIENT_ID=test-gcp:soknad:send-inn

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('sendInnContext', () => {
<AppConfigProvider
app={'fyllut'}
submissionMethod={submissionMethod}
featureToggles={{ enableMellomlagring: true }}
featureToggles={{ enableMellomlagring: true, enableCreateMellomlagring: true }}
http={mockHttp as unknown as typeof http}
baseUrl={'http://test.example.no'}
config={{ isTest: true }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ const SendInnProvider = ({
return;
}

// Complete the initialization before creating if createMellomlagring is not enabled
// Makes it possible to turn off NEW creations of mellomlagring, by setting createMellomlagring=false in ENABLED_FEATURES, without affecting existing ones
if (!featureToggles?.enableCreateMellomlagring) {
setIsMellomlagringReady(true);
return;
}

try {
setIsCreateStarted(true);
const currentLanguage = getLanguageFromSearchParams();
Expand Down

0 comments on commit cd33216

Please sign in to comment.