diff --git a/chart/tests/__snapshot__/content-configs_test.yaml.snap b/chart/tests/__snapshot__/content-configs_test.yaml.snap index c3707f4..75b1add 100644 --- a/chart/tests/__snapshot__/content-configs_test.yaml.snap +++ b/chart/tests/__snapshot__/content-configs_test.yaml.snap @@ -6,37 +6,6 @@ matches the snapshot: name: gardener namespace: NAMESPACE spec: - inlineConfiguration: - content: |2- - { - "name": "gardener", - "creationTimestamp": "2022-05-17T11:37:17Z", - "luigiConfigFragment": [ - { - "data": { - "nodes": [ - { - "entityType": "example", - "pathSegment": "gardener", - "label": "Gardener Dashboard", - "virtualTree": true, - "initialRoute": "namespace/_all/shoots", - "url": "https://d.ing.gardener-op.mfp-dev.shoot.canary.k8s-hana.ondemand.com", - "icon": "https://d.ing.gardener-op.mfp-dev.shoot.canary.k8s-hana.ondemand.com/static/assets/logo.svg" - } - ] - } - } - ] - } - contentType: json - 2: | - apiVersion: core.openmfp.io/v1alpha1 - kind: ContentConfiguration - metadata: - name: home - namespace: NAMESPACE - spec: - inlineConfiguration: - content: "\n{\n \"name\": \"overview\",\n \"luigiConfigFragment\": [\n {\n \"data\": {\n \"nodes\": [\n {\n \"entityType\": \"global\",\n \"pathSegment\": \"home\",\n \"label\": \"Overview\",\n \"icon\": \"home\",\n \"hideFromNav\": true, \n \"defineEntity\": {\n \"id\": \"example\"\n },\n \"children\": [\n {\n \"pathSegment\": \"overview\",\n \"label\": \"Overview\",\n \"icon\": \"home\",\n \"url\": \"https://fiddle.luigi-project.io/examples/microfrontends/multipurpose.html\",\n \"context\": {\n \"title\": \"Welcome to OpenMFP Portal\",\n \"content\": \" \"\n }\n }\n ]\n }\n ]\n }\n }\n ]\n}" + remoteConfiguration: contentType: json + url: https:///assets/accounts.json diff --git a/chart/tests/__snapshot__/deploy_test.yaml.snap b/chart/tests/__snapshot__/deploy_test.yaml.snap index fc6b9b3..d929e8e 100644 --- a/chart/tests/__snapshot__/deploy_test.yaml.snap +++ b/chart/tests/__snapshot__/deploy_test.yaml.snap @@ -23,34 +23,9 @@ matches the snapshot: spec: containers: - env: - - name: HTTP_PROTOCOL - value: https - - name: OIDC_CLIENT_ID_PORTAL - value: 12345 - - name: OIDC_CLIENT_SECRET_PORTAL - valueFrom: - secretKeyRef: - key: secret - name: portal-client-secret-portal - - name: AUTH_SERVER_URL_PORTAL - value: https://auth.example.com - - name: TOKEN_URL_PORTAL - value: https://auth.example.com/oauth2/token - - name: BASE_DOMAINS_PORTAL - value: portal.example.com,portal2.example.com - - name: IDP_NAMES - value: portal - name: PORT value: "8080" - - name: REGION - value: null - - name: IMAGE_TAG - value: "12345" - - name: IMAGE_NAME - value: ghcr.io/openmfp/portal - - name: COOKIE_DOMAIN - value: null - image: ghcr.io/openmfp/portal:12345 + image: ghcr.io/openmfp/example-content:12345 imagePullPolicy: IfNotPresent name: RELEASE-NAME ports: @@ -95,36 +70,9 @@ matches the snapshot with FRONTEND_PORT: spec: containers: - env: - - name: HTTP_PROTOCOL - value: https - - name: OIDC_CLIENT_ID_PORTAL - value: 12345 - - name: OIDC_CLIENT_SECRET_PORTAL - valueFrom: - secretKeyRef: - key: secret - name: portal-client-secret-portal - - name: AUTH_SERVER_URL_PORTAL - value: https://auth.example.com - - name: TOKEN_URL_PORTAL - value: https://auth.example.com/oauth2/token - - name: BASE_DOMAINS_PORTAL - value: portal.example.com,portal2.example.com - - name: IDP_NAMES - value: portal - name: PORT value: "8080" - - name: REGION - value: null - - name: IMAGE_TAG - value: "12345" - - name: IMAGE_NAME - value: ghcr.io/openmfp/portal - - name: COOKIE_DOMAIN - value: null - - name: FRONTEND_PORT - value: "8080" - image: ghcr.io/openmfp/portal:12345 + image: ghcr.io/openmfp/example-content:12345 imagePullPolicy: IfNotPresent name: RELEASE-NAME ports: diff --git a/chart/tests/__snapshot__/external-secrets_test.yaml.snap b/chart/tests/__snapshot__/external-secrets_test.yaml.snap index 9af794c..0967ef4 100644 --- a/chart/tests/__snapshot__/external-secrets_test.yaml.snap +++ b/chart/tests/__snapshot__/external-secrets_test.yaml.snap @@ -1,22 +1 @@ -matches the snapshot: - 1: | - apiVersion: external-secrets.io/v1beta1 - kind: ExternalSecret - metadata: - name: RELEASE-NAME-portal-client-secret-portal - namespace: NAMESPACE - spec: - data: - - remoteRef: - conversionStrategy: Default - key: dxp-core-team/manual-secrets/portal-client-secrets - property: portal - secretKey: secret - refreshInterval: 10m - secretStoreRef: - kind: SecretStore - name: environment-store - target: - creationPolicy: Owner - deletionPolicy: Retain - name: portal-client-secret-portal +{} diff --git a/chart/tests/__snapshot__/istio_test.yaml.snap b/chart/tests/__snapshot__/istio_test.yaml.snap index e20a301..d0bffeb 100644 --- a/chart/tests/__snapshot__/istio_test.yaml.snap +++ b/chart/tests/__snapshot__/istio_test.yaml.snap @@ -32,10 +32,7 @@ matches the snapshot: gateways: - NAMESPACE/gateway hosts: - - portal.example.com - - portal.portal.example.com - - portal2.example.com - - portal.portal2.example.com + - content.d1.openmfp.dxp.k8s.ondemand.com http: - corsPolicy: allowHeaders: diff --git a/chart/tests/__snapshot__/rbac_test.yaml.snap b/chart/tests/__snapshot__/rbac_test.yaml.snap index a861b5e..0967ef4 100644 --- a/chart/tests/__snapshot__/rbac_test.yaml.snap +++ b/chart/tests/__snapshot__/rbac_test.yaml.snap @@ -1,28 +1 @@ -match the snapshot: - 1: | - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: contentconfigurations-reader - rules: - - apiGroups: - - core.openmfp.io - resources: - - contentconfigurations - verbs: - - get - - watch - - list - 2: | - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: read-contentconfigurations-global - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: contentconfigurations-reader - subjects: - - kind: ServiceAccount - name: RELEASE-NAME - namespace: NAMESPACE +{} diff --git a/chart/tests/external-secrets_test.yaml b/chart/tests/external-secrets_test.yaml deleted file mode 100644 index 01123e3..0000000 --- a/chart/tests/external-secrets_test.yaml +++ /dev/null @@ -1,10 +0,0 @@ -suite: external-secrets -templates: - - external-secrets.yaml -tests: - - it: matches the snapshot - values: - - ../test-values.yaml - template: external-secrets.yaml - asserts: - - matchSnapshot: {} diff --git a/chart/tests/rbac_test.yaml b/chart/tests/rbac_test.yaml deleted file mode 100644 index d0ef838..0000000 --- a/chart/tests/rbac_test.yaml +++ /dev/null @@ -1,9 +0,0 @@ -suite: rbac -templates: - - rbac.yaml -values: - - ../test-values.yaml -tests: - - it: match the snapshot - asserts: - - matchSnapshot: {} diff --git a/package.json b/package.json index dad29d3..816599a 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,10 @@ "npm:install:ui": "cd frontend && npm install", "test": "concurrently 'npm:test:*(!cov)'", "test:ui": "cd frontend && npm run test", + "test:backend": "cd backend && npm run test", "build": "concurrently 'npm:build:*'", "build:ui": "cd frontend && npm run build", + "build:backend": "cd backend && npm run build", "prepare": "husky && npm run npm:install:ui" }, "private": true,