From ca085aed39a7746132cc7be15dadf77bb2192834 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Mon, 8 Jul 2024 15:48:39 +0100 Subject: [PATCH] fix: tests --- .gitignore | 2 +- .gitleaks.toml | 1 + .../templates/broker_deployment.yaml | 6 - charts/snyk-broker/templates/secrets.yaml | 33 ++-- ..._deployment_disablesuffixes_test.yaml.snap | 10 +- .../broker_cra_deployment_test.yaml.snap | 10 +- .../broker_deployment_apprisk_test.yaml.snap | 10 +- ...oker_deployment_artifactory_test.yaml.snap | 14 +- ...t_configmap_disablesuffixes_test.yaml.snap | 20 ++- ...broker_deployment_configmap_test.yaml.snap | 20 ++- ...ustomaccept_disablesuffixes_test.yaml.snap | 10 +- ...ker_deployment_customaccept_test.yaml.snap | 10 +- ..._deployment_disablesuffixes_test.yaml.snap | 40 ++++- ...ent_ingress_disablesuffixes_test.yaml.snap | 10 +- .../broker_deployment_ingress_test.yaml.snap | 10 +- .../broker_deployment_nexus_test.yaml.snap | 165 ------------------ ...r_deployment_scm_token_pool_test.yaml.snap | 30 +++- .../broker_deployment_test.yaml.snap | 52 +++++- .../cra_deployment_harbor_test.yaml.snap | 2 +- ...r_cra_deployment_disablesuffixes_test.yaml | 1 + ...ker_cra_deployment_extraPodSpecs_test.yaml | 1 + .../tests/broker_cra_deployment_test.yaml | 1 + .../tests/broker_deployment_apprisk_test.yaml | 1 + .../broker_deployment_artifactory_test.yaml | 1 + ...oyment_configmap_disablesuffixes_test.yaml | 8 +- .../broker_deployment_configmap_test.yaml | 6 +- ...ent_customaccept_disablesuffixes_test.yaml | 5 +- .../broker_deployment_customaccept_test.yaml | 5 +- ...roker_deployment_disablesuffixes_test.yaml | 2 + ...ployment_ingress_disablesuffixes_test.yaml | 2 + .../tests/broker_deployment_ingress_test.yaml | 2 + .../tests/broker_deployment_labels_test.yaml | 4 +- .../tests/broker_deployment_nexus_test.yaml | 165 ++++++++++++++---- ...broker_deployment_scm_token_pool_test.yaml | 2 + .../tests/broker_deployment_test.yaml | 2 + .../cra_deployment_digitalocean_test.yaml | 2 + .../cra_deployment_disablesuffixes_test.yaml | 2 + .../tests/cra_deployment_harbor_test.yaml | 2 + .../tests/cra_deployment_test.yaml | 2 + .../tests/fixtures/cacert_values.yaml | 2 +- .../tests/fixtures/customaccept_values.yaml | 4 +- .../customaccept_values_disablesuffixes.yaml | 4 +- .../tests/fixtures/default_values.yaml | 4 +- .../tests/fixtures/default_values_cra.yaml | 4 +- .../default_values_cra_digital_ocean.yaml | 2 +- .../default_values_cra_disablesuffixes.yaml | 4 +- .../fixtures/default_values_cra_harbor.yaml | 7 +- .../default_values_disablesuffixes.yaml | 4 +- .../tests/fixtures/default_values_ha_on.yaml | 2 +- .../default_values_ha_on_4_replicas.yaml | 2 +- ...lues_ha_on_4_replicas_disablesuffixes.yaml | 4 +- .../default_values_ha_on_disablesuffixes.yaml | 4 +- .../default_values_https_enabled.yaml | 4 +- .../default_values_preflight_off.yaml | 2 +- ..._values_preflight_off_disablesuffixes.yaml | 4 +- .../default_values_with_apprisk_enabled.yaml | 4 +- ...fault_values_with_github_scmtokenpool.yaml | 2 +- ...ub_useexternalsecretscmtokenpool_true.yaml | 2 +- ...fault_values_with_gitlab_scmtokenpool.yaml | 2 +- .../fixtures/default_values_with_ingress.yaml | 4 +- ...t_values_with_ingress_disablesuffixes.yaml | 4 +- 61 files changed, 446 insertions(+), 300 deletions(-) delete mode 100644 charts/snyk-broker/tests/__snapshot__/broker_deployment_nexus_test.yaml.snap diff --git a/.gitignore b/.gitignore index 70aca37..791bd40 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,4 @@ bitbucket.crt .dccache # Helm Unittest Debug -charts/snyk-broker/helm/.debug +charts/snyk-broker/.debug diff --git a/.gitleaks.toml b/.gitleaks.toml index fa94c79..6a1e198 100644 --- a/.gitleaks.toml +++ b/.gitleaks.toml @@ -6,6 +6,7 @@ description = "global allow list" paths = [ 'charts/snyk-broker/tests/__snapshot__/*', 'charts/snyk-broker/tests/.*(.key)$', + 'charts/snyk-broker/tests/fixtures/*' ] # ignoring historical secrets from past commits diff --git a/charts/snyk-broker/templates/broker_deployment.yaml b/charts/snyk-broker/templates/broker_deployment.yaml index b58d3f2..d1eeaeb 100644 --- a/charts/snyk-broker/templates/broker_deployment.yaml +++ b/charts/snyk-broker/templates/broker_deployment.yaml @@ -397,10 +397,6 @@ spec: # Code Agent - name: GIT_CLIENT_URL value: {{ default (printf "http://code-agent-service:%s" (.Values.deployment.container.caSnykPort | toString)) .Values.gitClientUrl }} - {{- else if .Values.enableSnykCodeLocalEngine }} - # Snyk Code Local Engine - - name: GIT_CLIENT_URL - value: {{ tpl .Values.gitClientUrl . }} {{- end }} # Logging - name: LOG_LEVEL @@ -465,10 +461,8 @@ spec: {{- if has .Values.scmType ( list "github-com" "github-enterprise" "bitbucket-server" "bitbucket-server-bearer-auth" "gitlab" "azure-repos") }} {{- if not .Values.disableAutoAcceptRules }} # Default Values to allow Snyk Code Snippets and Snyk IaC - {{- if not .Values.enableSnykCodeLocalEngine }} - name: ACCEPT_CODE value: "true" - {{- end}} - name: ACCEPT_IAC value: "tf,yaml,yml,json,tpl" {{- end}} diff --git a/charts/snyk-broker/templates/secrets.yaml b/charts/snyk-broker/templates/secrets.yaml index 4d74128..e6a9c3d 100644 --- a/charts/snyk-broker/templates/secrets.yaml +++ b/charts/snyk-broker/templates/secrets.yaml @@ -1,8 +1,9 @@ +{{ $suffix := ( .Values.disableSuffixes | default false ) | ternary "" ( printf "-%s" .Release.Name ) }} {{- if .Values.brokerToken }} apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-broker-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-broker-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-broker-token-key": {{ .Values.brokerToken | b64enc | quote }} @@ -12,7 +13,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-token-key": {{ .Values.scmToken | b64enc | quote }} @@ -22,7 +23,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType }}-token-pool{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType }}-token-pool{{ $suffix }} type: Opaque data: "{{ .Values.scmType }}-token-key-pool": {{ .Values.scmTokenPool | b64enc | quote }} @@ -32,7 +33,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-token-key": {{ .Values.bitbucketPassword | b64enc | quote }} @@ -42,7 +43,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque stringData: "{{ .Values.scmType}}-token-key": {{ .Values.bitbucketPat | quote }} @@ -52,7 +53,7 @@ stringData: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-token-key": {{ .Values.azureReposToken | b64enc | quote }} @@ -62,7 +63,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-token-key": {{ .Values.jiraPassword | b64enc | quote }} @@ -72,7 +73,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-token-key": {{ .Values.jiraPat | b64enc | quote }} @@ -82,7 +83,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-token-key": {{ .Values.crPassword | b64enc | quote }} @@ -92,7 +93,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: {{ .Values.scmType}}-token{{ $suffix }} type: Opaque data: "{{ .Values.scmType}}-token-key": {{ .Values.crToken | b64enc | quote }} @@ -102,7 +103,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: snyk-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: snyk-token{{ $suffix }} type: Opaque data: "snyk-token-key": {{ .Values.snykToken | b64enc | quote }} @@ -112,7 +113,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: artifactory-url{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: artifactory-url{{ $suffix }} type: Opaque stringData: artifactory-url: {{ .Values.artifactoryUrl | quote }} @@ -122,7 +123,7 @@ stringData: apiVersion: v1 kind: Secret metadata: - name: artifactory-broker-client-validation-url{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: artifactory-broker-client-validation-url{{ $suffix }} type: Opaque stringData: artifactory-broker-client-validation-url: {{ .Values.brokerClientValidationUrl | quote }} @@ -132,7 +133,7 @@ stringData: apiVersion: v1 kind: Secret metadata: - name: nexus-base-nexus-url{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: nexus-base-nexus-url{{ $suffix }} type: Opaque data: "nexus-base-nexus-url": {{ .Values.baseNexusUrl | b64enc | quote }} @@ -142,7 +143,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: nexus-nexus-url{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: nexus-nexus-url{{ $suffix }} type: Opaque data: "nexus-nexus-url": {{ .Values.nexusUrl | b64enc | quote }} @@ -153,7 +154,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: nexus-broker-client-validation-url{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} + name: nexus-broker-client-validation-url{{ $suffix }} type: Opaque stringData: nexus-broker-client-validation-url: {{ .Values.brokerClientValidationUrl | quote }} diff --git a/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_disablesuffixes_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_disablesuffixes_test.yaml.snap index 7bfe1d8..30b3ae3 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_disablesuffixes_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_disablesuffixes_test.yaml.snap @@ -122,12 +122,20 @@ with CRA: 3: | apiVersion: v1 data: - container-registry-agent-broker-token-key: MTIz + container-registry-agent-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: container-registry-agent-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_test.yaml.snap index 7bfe1d8..30b3ae3 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_test.yaml.snap @@ -122,12 +122,20 @@ with CRA: 3: | apiVersion: v1 data: - container-registry-agent-broker-token-key: MTIz + container-registry-agent-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: container-registry-agent-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_apprisk_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_apprisk_test.yaml.snap index 37be2c3..253a846 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_apprisk_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_apprisk_test.yaml.snap @@ -121,12 +121,20 @@ apprisk enabled: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_artifactory_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_artifactory_test.yaml.snap index 0f1f566..968001c 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_artifactory_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_artifactory_test.yaml.snap @@ -120,12 +120,20 @@ should render artifactoryUrl and brokerClientValidationUrl as secrets: 3: | apiVersion: v1 data: - artifactory-broker-token-key: MTIz + artifactory-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: artifactory-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: Secret metadata: @@ -133,7 +141,7 @@ should render artifactoryUrl and brokerClientValidationUrl as secrets: stringData: artifactory-url: username:password@your-domain.com/artifactory type: Opaque - 5: | + 6: | apiVersion: v1 kind: Secret metadata: @@ -141,7 +149,7 @@ should render artifactoryUrl and brokerClientValidationUrl as secrets: stringData: artifactory-broker-client-validation-url: https://username:password@your-domain.com/artifactory/api/system/ping type: Opaque - 6: | + 7: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_disablesuffixes_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_disablesuffixes_test.yaml.snap index bc30f7a..953742d 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_disablesuffixes_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_disablesuffixes_test.yaml.snap @@ -163,12 +163,20 @@ cacert: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: @@ -323,12 +331,20 @@ cacertfile: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_test.yaml.snap index 6478c53..18abac9 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_configmap_test.yaml.snap @@ -163,12 +163,20 @@ cacert: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: @@ -323,12 +331,20 @@ cacertfile: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_disablesuffixes_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_disablesuffixes_test.yaml.snap index bd8162e..37b18af 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_disablesuffixes_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_disablesuffixes_test.yaml.snap @@ -136,12 +136,20 @@ customaccept values: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_test.yaml.snap index 654abeb..af515d2 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_customaccept_test.yaml.snap @@ -136,12 +136,20 @@ customaccept values: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_disablesuffixes_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_disablesuffixes_test.yaml.snap index 499adb1..d07b1cd 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_disablesuffixes_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_disablesuffixes_test.yaml.snap @@ -121,12 +121,20 @@ HA mode on: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: @@ -260,12 +268,20 @@ HA mode on with 4 replicas: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: @@ -397,12 +413,20 @@ default values: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: @@ -536,12 +560,20 @@ preflight checks off: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_disablesuffixes_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_disablesuffixes_test.yaml.snap index 94be7f6..7ba21ce 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_disablesuffixes_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_disablesuffixes_test.yaml.snap @@ -139,12 +139,20 @@ ingress: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_test.yaml.snap index 8e8b152..a71a172 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_ingress_test.yaml.snap @@ -139,12 +139,20 @@ ingress: 4: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_nexus_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_nexus_test.yaml.snap deleted file mode 100644 index 1095ceb..0000000 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_nexus_test.yaml.snap +++ /dev/null @@ -1,165 +0,0 @@ -should render render nexusUrl, baseNexusUrl and brokerClientValidationUrl as secrets: - 1: | - apiVersion: apps/v1 - kind: Deployment - metadata: - labels: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: snyk-broker-RELEASE-NAME - helm.sh/chart: snyk-broker-0.0.0 - name: nexus-broker-RELEASE-NAME - namespace: NAMESPACE - spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: snyk-broker-RELEASE-NAME - template: - metadata: - labels: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: snyk-broker-RELEASE-NAME - spec: - containers: - - env: - - name: BROKER_SERVER_URL - value: https://broker.test.snyk.io - - name: BROKER_HEALTHCHECK_PATH - value: /healthcheck - - name: BROKER_SYSTEMCHECK_PATH - value: /systemcheck - - name: BROKER_TOKEN - valueFrom: - secretKeyRef: - key: nexus-broker-token-key - name: nexus-broker-token-RELEASE-NAME - - name: BASE_NEXUS_URL - valueFrom: - secretKeyRef: - key: nexus-base-nexus-url - name: nexus-base-nexus-url-RELEASE-NAME - - name: NEXUS_URL - valueFrom: - secretKeyRef: - key: nexus-nexus-url - name: nexus-nexus-url-RELEASE-NAME - - name: BROKER_CLIENT_VALIDATION_URL - valueFrom: - secretKeyRef: - key: nexus-broker-client-validation-url - name: nexus-broker-client-validation-url-RELEASE-NAME - - name: PORT - value: "8000" - - name: LOG_LEVEL - value: info - - name: LOG_ENABLE_BODY - value: "false" - - name: BROKER_DISPATCHER_BASE_URL - value: https://api.test.snyk.io - image: snyk/broker:nexus - imagePullPolicy: Always - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthcheck - port: 8000 - scheme: HTTP - initialDelaySeconds: 3 - periodSeconds: 10 - timeoutSeconds: 1 - name: nexus-broker-RELEASE-NAME - ports: - - containerPort: 8000 - name: http - readinessProbe: - failureThreshold: 3 - httpGet: - path: /healthcheck - port: 8000 - scheme: HTTP - initialDelaySeconds: 3 - periodSeconds: 10 - timeoutSeconds: 1 - resources: - limits: - cpu: 1 - memory: 256Mi - requests: - cpu: 1 - memory: 256Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 1000 - volumeMounts: null - securityContext: {} - serviceAccountName: snyk-broker-RELEASE-NAME - volumes: null - 2: | - apiVersion: v1 - kind: Service - metadata: - labels: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: snyk-broker-RELEASE-NAME - helm.sh/chart: snyk-broker-0.0.0 - name: nexus-broker-service-RELEASE-NAME - namespace: NAMESPACE - spec: - ports: - - port: 8000 - targetPort: 8000 - selector: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: snyk-broker-RELEASE-NAME - type: ClusterIP - 3: | - apiVersion: v1 - data: - nexus-broker-token-key: MTIz - kind: Secret - metadata: - name: nexus-broker-token-RELEASE-NAME - type: Opaque - 4: | - apiVersion: v1 - data: - nexus-base-nexus-url: aHR0cHM6Ly91c2VybmFtZTpwYXNzd29yZEB5b3VyLWRvbWFpbi5jb20= - kind: Secret - metadata: - name: nexus-base-nexus-url-RELEASE-NAME - type: Opaque - 5: | - apiVersion: v1 - data: - nexus-nexus-url: aHR0cHM6Ly91c2VybmFtZTpwYXNzd29yZEB5b3VyLWRvbWFpbi5jb20vcmVwb3NpdG9yeQ== - kind: Secret - metadata: - name: nexus-nexus-url-RELEASE-NAME - type: Opaque - 6: | - apiVersion: v1 - kind: Secret - metadata: - name: nexus-broker-client-validation-url-RELEASE-NAME - stringData: - nexus-broker-client-validation-url: https://username:password@your-domain.com/service/rest/v1/status/check - type: Opaque - 7: | - apiVersion: v1 - kind: ServiceAccount - metadata: - labels: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: snyk-broker-RELEASE-NAME - helm.sh/chart: snyk-broker-0.0.0 - name: snyk-broker-RELEASE-NAME - namespace: NAMESPACE diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap index e8ab45b..217ec69 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap @@ -124,7 +124,7 @@ github token pool configured: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME @@ -138,6 +138,14 @@ github token pool configured: name: github-com-token-pool-RELEASE-NAME type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: @@ -269,12 +277,20 @@ github token pool configured with enabled useExternalSecretScmTokenPool: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: @@ -413,7 +429,7 @@ gitlab token pool configured: 3: | apiVersion: v1 data: - gitlab-broker-token-key: MTIz + gitlab-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: gitlab-broker-token-RELEASE-NAME @@ -427,6 +443,14 @@ gitlab token pool configured: name: gitlab-token-pool-RELEASE-NAME type: Opaque 5: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 6: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_test.yaml.snap index ac8a586..c36da32 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_test.yaml.snap @@ -121,12 +121,20 @@ HA mode on: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: @@ -260,12 +268,20 @@ HA mode on with 4 replicas: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: @@ -407,12 +423,20 @@ HTTPS enabled: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 data: tls.crt: "" @@ -421,7 +445,7 @@ HTTPS enabled: metadata: name: RELEASE-NAME-snyk-broker-tls-secret type: kubernetes.io/tls - 5: | + 6: | apiVersion: v1 kind: ServiceAccount metadata: @@ -553,12 +577,20 @@ default values: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: @@ -692,12 +724,20 @@ preflight checks off: 3: | apiVersion: v1 data: - github-com-broker-token-key: MTIz + github-com-broker-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz kind: Secret metadata: name: github-com-broker-token-RELEASE-NAME type: Opaque 4: | + apiVersion: v1 + data: + snyk-token-key: MTIzNDVhNmItNzhkOS0xZTJmLTNhYmMtNDU2ZGVmNzg5MTIz + kind: Secret + metadata: + name: snyk-token-RELEASE-NAME + type: Opaque + 5: | apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/snyk-broker/tests/__snapshot__/cra_deployment_harbor_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/cra_deployment_harbor_test.yaml.snap index 2f405fd..6fb3b05 100644 --- a/charts/snyk-broker/tests/__snapshot__/cra_deployment_harbor_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/cra_deployment_harbor_test.yaml.snap @@ -38,7 +38,7 @@ default values: - name: CR_AGENT_URL value: http://cra-service-RELEASE-NAME:8081 - name: CR_TYPE - value: harbor + value: harbor-cr - name: CR_BASE value: crBaseValue - name: CR_USERNAME diff --git a/charts/snyk-broker/tests/broker_cra_deployment_disablesuffixes_test.yaml b/charts/snyk-broker/tests/broker_cra_deployment_disablesuffixes_test.yaml index 0f6a40c..a49cd48 100644 --- a/charts/snyk-broker/tests/broker_cra_deployment_disablesuffixes_test.yaml +++ b/charts/snyk-broker/tests/broker_cra_deployment_disablesuffixes_test.yaml @@ -10,6 +10,7 @@ templates: tests: - it: with CRA values: + - ./fixtures/default_values.yaml - ./fixtures/default_values_cra.yaml asserts: - matchSnapshot: {} diff --git a/charts/snyk-broker/tests/broker_cra_deployment_extraPodSpecs_test.yaml b/charts/snyk-broker/tests/broker_cra_deployment_extraPodSpecs_test.yaml index 5fc8724..72108f3 100644 --- a/charts/snyk-broker/tests/broker_cra_deployment_extraPodSpecs_test.yaml +++ b/charts/snyk-broker/tests/broker_cra_deployment_extraPodSpecs_test.yaml @@ -5,6 +5,7 @@ templates: - broker_deployment.yaml - cra_deployment.yaml values: + - ./fixtures/default_values.yaml - ./fixtures/default_values_cra.yaml - ./fixtures/extra_pod_spec_values.yaml diff --git a/charts/snyk-broker/tests/broker_cra_deployment_test.yaml b/charts/snyk-broker/tests/broker_cra_deployment_test.yaml index 9c0a4be..b9cf7b0 100644 --- a/charts/snyk-broker/tests/broker_cra_deployment_test.yaml +++ b/charts/snyk-broker/tests/broker_cra_deployment_test.yaml @@ -10,6 +10,7 @@ templates: tests: - it: with CRA values: + - ./fixtures/default_values.yaml - ./fixtures/default_values_cra.yaml asserts: - matchSnapshot: {} diff --git a/charts/snyk-broker/tests/broker_deployment_apprisk_test.yaml b/charts/snyk-broker/tests/broker_deployment_apprisk_test.yaml index 2360270..43a84eb 100644 --- a/charts/snyk-broker/tests/broker_deployment_apprisk_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_apprisk_test.yaml @@ -10,6 +10,7 @@ templates: tests: - it: apprisk enabled values: + - ./fixtures/default_values.yaml - ./fixtures/default_values_with_apprisk_enabled.yaml asserts: - matchSnapshot: {} diff --git a/charts/snyk-broker/tests/broker_deployment_artifactory_test.yaml b/charts/snyk-broker/tests/broker_deployment_artifactory_test.yaml index 14e191c..bae2bee 100644 --- a/charts/snyk-broker/tests/broker_deployment_artifactory_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_artifactory_test.yaml @@ -8,6 +8,7 @@ templates: - serviceaccount.yaml values: - ./fixtures/default_values.yaml + - ./fixtures/default_values.yaml tests: - it: should render artifactoryUrl and brokerClientValidationUrl as secrets diff --git a/charts/snyk-broker/tests/broker_deployment_configmap_disablesuffixes_test.yaml b/charts/snyk-broker/tests/broker_deployment_configmap_disablesuffixes_test.yaml index 527dab3..0c81319 100644 --- a/charts/snyk-broker/tests/broker_deployment_configmap_disablesuffixes_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_configmap_disablesuffixes_test.yaml @@ -8,17 +8,17 @@ templates: - serviceaccount.yaml - cacert_configmap.yaml +values: + - ./fixtures/default_values.yaml + - ./fixtures/default_values_disablesuffixes.yaml + tests: - it: cacert - values: - - ./fixtures/default_values_disablesuffixes.yaml set: caCert: tests/dummy_ca_cert.pem asserts: - matchSnapshot: {} - it: cacertfile - values: - - ./fixtures/default_values_disablesuffixes.yaml set: caCertFile: testValueSetBySetFile asserts: diff --git a/charts/snyk-broker/tests/broker_deployment_configmap_test.yaml b/charts/snyk-broker/tests/broker_deployment_configmap_test.yaml index 794dc68..c2191a5 100644 --- a/charts/snyk-broker/tests/broker_deployment_configmap_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_configmap_test.yaml @@ -7,18 +7,16 @@ templates: - secrets.yaml - serviceaccount.yaml - cacert_configmap.yaml +values: + - ./fixtures/default_values.yaml tests: - it: cacert - values: - - ./fixtures/default_values.yaml set: caCert: tests/dummy_ca_cert.pem asserts: - matchSnapshot: {} - it: cacertfile - values: - - ./fixtures/default_values.yaml set: caCertFile: testValueSetBySetFile asserts: diff --git a/charts/snyk-broker/tests/broker_deployment_customaccept_disablesuffixes_test.yaml b/charts/snyk-broker/tests/broker_deployment_customaccept_disablesuffixes_test.yaml index 910eeb1..944bef1 100644 --- a/charts/snyk-broker/tests/broker_deployment_customaccept_disablesuffixes_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_customaccept_disablesuffixes_test.yaml @@ -7,10 +7,11 @@ templates: - secrets.yaml - serviceaccount.yaml - accept_configmap.yaml +values: + - ./fixtures/default_values.yaml + - ./fixtures/customaccept_values_disablesuffixes.yaml tests: - it: customaccept values - values: - - ./fixtures/customaccept_values_disablesuffixes.yaml asserts: - matchSnapshot: {} diff --git a/charts/snyk-broker/tests/broker_deployment_customaccept_test.yaml b/charts/snyk-broker/tests/broker_deployment_customaccept_test.yaml index 96bf493..a9449b7 100644 --- a/charts/snyk-broker/tests/broker_deployment_customaccept_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_customaccept_test.yaml @@ -7,10 +7,11 @@ templates: - secrets.yaml - serviceaccount.yaml - accept_configmap.yaml +values: + - ./fixtures/default_values.yaml + - ./fixtures/customaccept_values.yaml tests: - it: customaccept values - values: - - ./fixtures/customaccept_values.yaml asserts: - matchSnapshot: {} diff --git a/charts/snyk-broker/tests/broker_deployment_disablesuffixes_test.yaml b/charts/snyk-broker/tests/broker_deployment_disablesuffixes_test.yaml index 686f197..d9d7784 100644 --- a/charts/snyk-broker/tests/broker_deployment_disablesuffixes_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_disablesuffixes_test.yaml @@ -6,6 +6,8 @@ templates: - broker_service.yaml - secrets.yaml - serviceaccount.yaml +values: + - ./fixtures/default_values.yaml tests: - it: default values diff --git a/charts/snyk-broker/tests/broker_deployment_ingress_disablesuffixes_test.yaml b/charts/snyk-broker/tests/broker_deployment_ingress_disablesuffixes_test.yaml index aab3f87..a100227 100644 --- a/charts/snyk-broker/tests/broker_deployment_ingress_disablesuffixes_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_ingress_disablesuffixes_test.yaml @@ -7,6 +7,8 @@ templates: - secrets.yaml - serviceaccount.yaml - broker_ingress.yaml +values: + - ./fixtures/default_values.yaml tests: - it: ingress diff --git a/charts/snyk-broker/tests/broker_deployment_ingress_test.yaml b/charts/snyk-broker/tests/broker_deployment_ingress_test.yaml index ef10fd9..e4d8239 100644 --- a/charts/snyk-broker/tests/broker_deployment_ingress_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_ingress_test.yaml @@ -7,6 +7,8 @@ templates: - secrets.yaml - serviceaccount.yaml - broker_ingress.yaml +values: + - ./fixtures/default_values.yaml tests: - it: ingress diff --git a/charts/snyk-broker/tests/broker_deployment_labels_test.yaml b/charts/snyk-broker/tests/broker_deployment_labels_test.yaml index f4b9177..d81b61a 100644 --- a/charts/snyk-broker/tests/broker_deployment_labels_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_labels_test.yaml @@ -5,6 +5,8 @@ templates: - broker_deployment.yaml - broker_service.yaml - serviceaccount.yaml +values: + - ./fixtures/default_values.yaml tests: - it: handles duplicative labels and adds new labels @@ -17,7 +19,7 @@ tests: asserts: - equal: path: metadata.labels - value: + value: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: snyk-broker-RELEASE-NAME diff --git a/charts/snyk-broker/tests/broker_deployment_nexus_test.yaml b/charts/snyk-broker/tests/broker_deployment_nexus_test.yaml index 6773a36..ac657e6 100644 --- a/charts/snyk-broker/tests/broker_deployment_nexus_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_nexus_test.yaml @@ -1,94 +1,189 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json suite: broker deployment (nexus) chart: version: 0.0.0 values: - ./fixtures/default_values.yaml +templates: + - secrets.yaml + - broker_deployment.yaml +set: + scmType: nexus tests: - - it: should create secret if brokerClientValidationUrl, baseNexusUrl and nexusUrl are defined + - it: should create secrets if brokerClientValidationUrl, baseNexusUrl and nexusUrl are defined template: secrets.yaml - set: - scmType: nexus baseNexusUrl: https://username:password@your-domain.com nexusUrl: https://username:password@your-domain.com/repository brokerClientValidationUrl: https://username:password@your-domain.com/service/rest/v1/status/check disableSuffixes: true - documentIndex: 3 asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - name: nexus-broker-client-validation-url + + - isKind: + of: Secret + documentSelector: + path: metadata.name + value: nexus-broker-client-validation-url - equal: path: stringData.nexus-broker-client-validation-url value: https://username:password@your-domain.com/service/rest/v1/status/check + documentSelector: + path: metadata.name + value: nexus-broker-client-validation-url + + - isKind: + of: Secret + documentSelector: + path: metadata.name + value: nexus-nexus-url + - equal: + path: data.nexus-nexus-url + value: aHR0cHM6Ly91c2VybmFtZTpwYXNzd29yZEB5b3VyLWRvbWFpbi5jb20vcmVwb3NpdG9yeQ== + documentSelector: + path: metadata.name + value: nexus-nexus-url + + - isKind: + of: Secret + documentSelector: + path: metadata.name + value: nexus-base-nexus-url + - equal: + path: data.nexus-base-nexus-url + value: aHR0cHM6Ly91c2VybmFtZTpwYXNzd29yZEB5b3VyLWRvbWFpbi5jb20= + documentSelector: + path: metadata.name + value: nexus-base-nexus-url + - - it: should create secret if brokerClientValidationUrl and nexusUrl are defined + - it: should create secrets if brokerClientValidationUrl and nexusUrl are defined template: secrets.yaml set: - scmType: nexus nexusUrl: https://username:password@your-domain.com/repository brokerClientValidationUrl: https://username:password@your-domain.com/service/rest/v1/status/check disableSuffixes: true - documentIndex: 2 asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - name: nexus-broker-client-validation-url + + - isKind: + of: Secret + documentSelector: + path: metadata.name + value: nexus-broker-client-validation-url - equal: path: stringData.nexus-broker-client-validation-url value: https://username:password@your-domain.com/service/rest/v1/status/check + documentSelector: + path: metadata.name + value: nexus-broker-client-validation-url + + - isKind: + of: Secret + documentSelector: + path: metadata.name + value: nexus-nexus-url + - equal: + path: data.nexus-nexus-url + value: aHR0cHM6Ly91c2VybmFtZTpwYXNzd29yZEB5b3VyLWRvbWFpbi5jb20vcmVwb3NpdG9yeQ== + documentSelector: + path: metadata.name + value: nexus-nexus-url + + - containsDocument: + kind: Secret + apiVersion: v1 + name: nexus-nexus-base-url + not: true - - it: should create secret if brokerClientValidationUrl and baseNexusUrl are defined + - it: should create secrets if brokerClientValidationUrl and baseNexusUrl are defined template: secrets.yaml set: - scmType: nexus baseNexusUrl: https://username:password@your-domain.com brokerClientValidationUrl: https://username:password@your-domain.com/service/rest/v1/status/check disableSuffixes: true - documentIndex: 2 asserts: - - containsDocument: - apiVersion: v1 - kind: Secret - name: nexus-broker-client-validation-url + + - isKind: + of: Secret + documentSelector: + path: metadata.name + value: nexus-broker-client-validation-url - equal: path: stringData.nexus-broker-client-validation-url value: https://username:password@your-domain.com/service/rest/v1/status/check + documentSelector: + path: metadata.name + value: nexus-broker-client-validation-url + + - isKind: + of: Secret + documentSelector: + path: metadata.name + value: nexus-base-nexus-url + - equal: + path: data.nexus-base-nexus-url + value: aHR0cHM6Ly91c2VybmFtZTpwYXNzd29yZEB5b3VyLWRvbWFpbi5jb20= + documentSelector: + path: metadata.name + value: nexus-base-nexus-url + + - containsDocument: + kind: Secret + apiVersion: v1 + name: nexus-nexus-url + not: true - it: should not create secret for brokerClientValidationUrl if value is empty template: secrets.yaml set: - scmType: nexus nexusUrl: https://username:password@your-domain.com/repository baseNexusUrl: https://username:password@your-domain.com disableSuffixes: true asserts: - - notEqual: - path: metadata.name - value: nexus-broker-client-validation-url - - - it: should render render nexusUrl, baseNexusUrl and brokerClientValidationUrl as secrets - templates: - - broker_deployment.yaml - - broker_service.yaml - - secrets.yaml - - serviceaccount.yaml + - containsDocument: + kind: Secret + apiVersion: v1 + name: nexus-broker-client-validation-url + not: true + - it: references secrets in deployment + release: + name: unittest + template: broker_deployment.yaml set: - scmType: nexus baseNexusUrl: https://username:password@your-domain.com nexusUrl: https://username:password@your-domain.com/repository brokerClientValidationUrl: https://username:password@your-domain.com/service/rest/v1/status/check asserts: - - matchSnapshot: {} + - contains: + path: spec.template.spec.containers[0].env + content: + name: BASE_NEXUS_URL + valueFrom: + secretKeyRef: + name: nexus-base-nexus-url-unittest + key: "nexus-base-nexus-url" + - contains: + path: spec.template.spec.containers[0].env + content: + name: NEXUS_URL + valueFrom: + secretKeyRef: + name: nexus-nexus-url-unittest + key: "nexus-nexus-url" + - contains: + path: spec.template.spec.containers[0].env + content: + name: BROKER_CLIENT_VALIDATION_URL + valueFrom: + secretKeyRef: + name: nexus-broker-client-validation-url-unittest + key: "nexus-broker-client-validation-url" diff --git a/charts/snyk-broker/tests/broker_deployment_scm_token_pool_test.yaml b/charts/snyk-broker/tests/broker_deployment_scm_token_pool_test.yaml index e7b54c4..bea1982 100644 --- a/charts/snyk-broker/tests/broker_deployment_scm_token_pool_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_scm_token_pool_test.yaml @@ -6,6 +6,8 @@ templates: - broker_service.yaml - secrets.yaml - serviceaccount.yaml +values: + - ./fixtures/default_values.yaml tests: - it: github token pool configured diff --git a/charts/snyk-broker/tests/broker_deployment_test.yaml b/charts/snyk-broker/tests/broker_deployment_test.yaml index 55e2f2b..458cc10 100644 --- a/charts/snyk-broker/tests/broker_deployment_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_test.yaml @@ -6,6 +6,8 @@ templates: - broker_service.yaml - secrets.yaml - serviceaccount.yaml +values: + - ./fixtures/default_values.yaml tests: - it: default values diff --git a/charts/snyk-broker/tests/cra_deployment_digitalocean_test.yaml b/charts/snyk-broker/tests/cra_deployment_digitalocean_test.yaml index 19d4e89..4609c5c 100644 --- a/charts/snyk-broker/tests/cra_deployment_digitalocean_test.yaml +++ b/charts/snyk-broker/tests/cra_deployment_digitalocean_test.yaml @@ -4,6 +4,8 @@ chart: templates: - cra_deployment.yaml - broker_deployment.yaml +values: + - ./fixtures/default_values.yaml tests: - it: default values diff --git a/charts/snyk-broker/tests/cra_deployment_disablesuffixes_test.yaml b/charts/snyk-broker/tests/cra_deployment_disablesuffixes_test.yaml index 1fd760a..c9ef1d4 100644 --- a/charts/snyk-broker/tests/cra_deployment_disablesuffixes_test.yaml +++ b/charts/snyk-broker/tests/cra_deployment_disablesuffixes_test.yaml @@ -4,6 +4,8 @@ chart: templates: - cra_deployment.yaml - broker_deployment.yaml +values: + - ./fixtures/default_values.yaml tests: - it: default values diff --git a/charts/snyk-broker/tests/cra_deployment_harbor_test.yaml b/charts/snyk-broker/tests/cra_deployment_harbor_test.yaml index 2630fd1..08258d0 100644 --- a/charts/snyk-broker/tests/cra_deployment_harbor_test.yaml +++ b/charts/snyk-broker/tests/cra_deployment_harbor_test.yaml @@ -4,6 +4,8 @@ chart: templates: - cra_deployment.yaml - broker_deployment.yaml +values: + - ./fixtures/default_values.yaml tests: - it: default values diff --git a/charts/snyk-broker/tests/cra_deployment_test.yaml b/charts/snyk-broker/tests/cra_deployment_test.yaml index 8acac29..f76d8e3 100644 --- a/charts/snyk-broker/tests/cra_deployment_test.yaml +++ b/charts/snyk-broker/tests/cra_deployment_test.yaml @@ -4,6 +4,8 @@ chart: templates: - cra_deployment.yaml - broker_deployment.yaml +values: + - ./fixtures/default_values.yaml tests: - it: default values diff --git a/charts/snyk-broker/tests/fixtures/cacert_values.yaml b/charts/snyk-broker/tests/fixtures/cacert_values.yaml index 2b7ec52..80410cc 100644 --- a/charts/snyk-broker/tests/fixtures/cacert_values.yaml +++ b/charts/snyk-broker/tests/fixtures/cacert_values.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker diff --git a/charts/snyk-broker/tests/fixtures/customaccept_values.yaml b/charts/snyk-broker/tests/fixtures/customaccept_values.yaml index d999e04..ba5ed9d 100644 --- a/charts/snyk-broker/tests/fixtures/customaccept_values.yaml +++ b/charts/snyk-broker/tests/fixtures/customaccept_values.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -22,4 +22,4 @@ highAvailabilityMode: brokerDispatcherUrl: "https://api.test.snyk.io" acceptJson: | - test \ No newline at end of file + test diff --git a/charts/snyk-broker/tests/fixtures/customaccept_values_disablesuffixes.yaml b/charts/snyk-broker/tests/fixtures/customaccept_values_disablesuffixes.yaml index e4cb7fc..b8db470 100644 --- a/charts/snyk-broker/tests/fixtures/customaccept_values_disablesuffixes.yaml +++ b/charts/snyk-broker/tests/fixtures/customaccept_values_disablesuffixes.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -24,4 +24,4 @@ brokerDispatcherUrl: "https://api.test.snyk.io" acceptJson: | test -disableSuffixes: true \ No newline at end of file +disableSuffixes: true diff --git a/charts/snyk-broker/tests/fixtures/default_values.yaml b/charts/snyk-broker/tests/fixtures/default_values.yaml index aaaa567..b5fb9c2 100644 --- a/charts/snyk-broker/tests/fixtures/default_values.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values.yaml @@ -5,7 +5,9 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" + +snykToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker diff --git a/charts/snyk-broker/tests/fixtures/default_values_cra.yaml b/charts/snyk-broker/tests/fixtures/default_values_cra.yaml index f597c85..2e2670d 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_cra.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_cra.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -29,4 +29,4 @@ crRoleArn: "arn:aws-us-gov:iam::123456789012:role" crRegion: "eu-west" -crExternalId: "11111111-1111-1111-1111-111111111111" \ No newline at end of file +crExternalId: "11111111-1111-1111-1111-111111111111" diff --git a/charts/snyk-broker/tests/fixtures/default_values_cra_digital_ocean.yaml b/charts/snyk-broker/tests/fixtures/default_values_cra_digital_ocean.yaml index 603e663..c924775 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_cra_digital_ocean.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_cra_digital_ocean.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker diff --git a/charts/snyk-broker/tests/fixtures/default_values_cra_disablesuffixes.yaml b/charts/snyk-broker/tests/fixtures/default_values_cra_disablesuffixes.yaml index 58367ee..2edbfdd 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_cra_disablesuffixes.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_cra_disablesuffixes.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -31,4 +31,4 @@ crRegion: "eu-west" crExternalId: "11111111-1111-1111-1111-111111111111" -disableSuffixes: true \ No newline at end of file +disableSuffixes: true diff --git a/charts/snyk-broker/tests/fixtures/default_values_cra_harbor.yaml b/charts/snyk-broker/tests/fixtures/default_values_cra_harbor.yaml index 7110ab4..2dfa336 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_cra_harbor.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_cra_harbor.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -23,10 +23,11 @@ brokerDispatcherUrl: "https://api.test.snyk.io" scmType: "container-registry-agent" -crType: "harbor" +# https://docs.snyk.io/enterprise-configuration/snyk-broker/snyk-broker-container-registry-agent/install-broker-for-container-registry-agent-using-helm +crType: "harbor-cr" crBase: "crBaseValue" crUsername: myusername -crPassword: mypassword \ No newline at end of file +crPassword: mypassword diff --git a/charts/snyk-broker/tests/fixtures/default_values_disablesuffixes.yaml b/charts/snyk-broker/tests/fixtures/default_values_disablesuffixes.yaml index b3ccade..2841b34 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_disablesuffixes.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_disablesuffixes.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -21,4 +21,4 @@ highAvailabilityMode: enabled: false brokerDispatcherUrl: "https://api.test.snyk.io" -disableSuffixes: true \ No newline at end of file +disableSuffixes: true diff --git a/charts/snyk-broker/tests/fixtures/default_values_ha_on.yaml b/charts/snyk-broker/tests/fixtures/default_values_ha_on.yaml index aa9d66e..a4f5820 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_ha_on.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_ha_on.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker diff --git a/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas.yaml b/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas.yaml index 3430509..77c35b2 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker diff --git a/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas_disablesuffixes.yaml b/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas_disablesuffixes.yaml index c534d5e..5e672fa 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas_disablesuffixes.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_ha_on_4_replicas_disablesuffixes.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -23,4 +23,4 @@ brokerDispatcherUrl: "https://api.test.snyk.io" replicaCount: 4 -disableSuffixes: true \ No newline at end of file +disableSuffixes: true diff --git a/charts/snyk-broker/tests/fixtures/default_values_ha_on_disablesuffixes.yaml b/charts/snyk-broker/tests/fixtures/default_values_ha_on_disablesuffixes.yaml index 4766fa2..74e87de 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_ha_on_disablesuffixes.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_ha_on_disablesuffixes.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -21,4 +21,4 @@ highAvailabilityMode: enabled: true brokerDispatcherUrl: "https://api.test.snyk.io" -disableSuffixes: true \ No newline at end of file +disableSuffixes: true diff --git a/charts/snyk-broker/tests/fixtures/default_values_https_enabled.yaml b/charts/snyk-broker/tests/fixtures/default_values_https_enabled.yaml index 30c0352..3f2eca0 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_https_enabled.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_https_enabled.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -28,4 +28,4 @@ enableBrokerLocalWebserverOverHttps: true httpsCert: "dummy_tls_cert.crt" # Location of mounted HTTPS key -httpsKey: "dummy_tls_key.key" \ No newline at end of file +httpsKey: "dummy_tls_key.key" diff --git a/charts/snyk-broker/tests/fixtures/default_values_preflight_off.yaml b/charts/snyk-broker/tests/fixtures/default_values_preflight_off.yaml index 6c45501..5e07e6b 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_preflight_off.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_preflight_off.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker diff --git a/charts/snyk-broker/tests/fixtures/default_values_preflight_off_disablesuffixes.yaml b/charts/snyk-broker/tests/fixtures/default_values_preflight_off_disablesuffixes.yaml index f4648b2..0aa5b8c 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_preflight_off_disablesuffixes.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_preflight_off_disablesuffixes.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -21,4 +21,4 @@ highAvailabilityMode: enabled: false brokerDispatcherUrl: "https://api.test.snyk.io" -disableSuffixes: true \ No newline at end of file +disableSuffixes: true diff --git a/charts/snyk-broker/tests/fixtures/default_values_with_apprisk_enabled.yaml b/charts/snyk-broker/tests/fixtures/default_values_with_apprisk_enabled.yaml index 87f183e..96f4851 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_with_apprisk_enabled.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_with_apprisk_enabled.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -21,4 +21,4 @@ highAvailabilityMode: enabled: false brokerDispatcherUrl: "https://api.test.snyk.io" -enableAppRisk: "true" \ No newline at end of file +enableAppRisk: true diff --git a/charts/snyk-broker/tests/fixtures/default_values_with_github_scmtokenpool.yaml b/charts/snyk-broker/tests/fixtures/default_values_with_github_scmtokenpool.yaml index a223f42..60f71a4 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_with_github_scmtokenpool.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_with_github_scmtokenpool.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # GitHub token pool, comma-separated scmType: "github-com" diff --git a/charts/snyk-broker/tests/fixtures/default_values_with_github_useexternalsecretscmtokenpool_true.yaml b/charts/snyk-broker/tests/fixtures/default_values_with_github_useexternalsecretscmtokenpool_true.yaml index 10dc090..61dffa2 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_with_github_useexternalsecretscmtokenpool_true.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_with_github_useexternalsecretscmtokenpool_true.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # GitHub token pool, comma-separated scmType: "github-com" diff --git a/charts/snyk-broker/tests/fixtures/default_values_with_gitlab_scmtokenpool.yaml b/charts/snyk-broker/tests/fixtures/default_values_with_gitlab_scmtokenpool.yaml index e08ce7f..1944a2a 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_with_gitlab_scmtokenpool.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_with_gitlab_scmtokenpool.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # GitLab token pool, comma-separated scmTokenPool: "gl_token_1,gl_token_2" diff --git a/charts/snyk-broker/tests/fixtures/default_values_with_ingress.yaml b/charts/snyk-broker/tests/fixtures/default_values_with_ingress.yaml index 289f056..0ca707d 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_with_ingress.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_with_ingress.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -22,4 +22,4 @@ highAvailabilityMode: brokerDispatcherUrl: "https://api.test.snyk.io" brokerIngress: - enabled: true \ No newline at end of file + enabled: true diff --git a/charts/snyk-broker/tests/fixtures/default_values_with_ingress_disablesuffixes.yaml b/charts/snyk-broker/tests/fixtures/default_values_with_ingress_disablesuffixes.yaml index 175c9c7..d149d36 100644 --- a/charts/snyk-broker/tests/fixtures/default_values_with_ingress_disablesuffixes.yaml +++ b/charts/snyk-broker/tests/fixtures/default_values_with_ingress_disablesuffixes.yaml @@ -5,7 +5,7 @@ ##### Snyk Specific Values ##### # Broker Token is a value from Snyk. Get this from the integration settings page or your Snyk Representative -brokerToken: "123" +brokerToken: "12345a6b-78d9-1e2f-3abc-456def789123" # brokerClientUrl is the address of the broker. This needs to be the address of itself. In the case of Kubernetes, you need to ensure that you are pointing to the cluster ingress you have setup. # Ex: http://kubernetes-ingress.domain.com:8000/broker @@ -24,4 +24,4 @@ brokerDispatcherUrl: "https://api.test.snyk.io" brokerIngress: enabled: true -disableSuffixes: true \ No newline at end of file +disableSuffixes: true