Skip to content

Correct failing crds helm.tests for providers onboardbase and fortanix #3214

@fdberlking

Description

@fdberlking

Describe the bug
After the introduction of providers OnBoardBase and Fortanix (see #2697) , I realised that the helm.test started to fail for crds_test.yaml.

To Reproduce
Steps to reproduce the behavior:

  1. Update your local repository to the latest version
  2. run make helm.test

Expected behavior
All tests passes.

Screenshots

 PASS  test cert controller deployment  deploy/charts/external-secrets/tests/cert_controller_test.yaml
 PASS  test controller deployment       deploy/charts/external-secrets/tests/controller_test.yaml
 FAIL  test crds        deploy/charts/external-secrets/tests/crds_test.yaml
        - should match snapshot of default values

                - asserts[0] `matchSnapshot` fail
                        Template:       external-secrets/templates/crds/secretstore.yaml
                        DocumentIndex:  0
                        Path:   
                        Expected to match snapshot 1:
                                --- Expected
                                +++ Actual
                                @@ -2075,2 +2075,45 @@
                                                       type: object
                                +                    chef:
                                +                      description: Chef configures this store to sync secrets with chef server
                                +                      properties:
                                +                        auth:
                                +                          description: Auth defines the information necessary to authenticate against chef Server
                                +                          properties:
                                +                            secretRef:
                                +                              description: ChefAuthSecretRef holds secret references for chef server login credentials.
                                +                              properties:
                                +                                privateKeySecretRef:
                                +                                  description: SecretKey is the Signing Key in PEM format, used for authentication.
                                +                                  properties:
                                +                                    key:
                                +                                      description: |-
                                +                                        The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
                                +                                        defaulted, in others it may be required.
                                +                                      type: string
                                +                                    name:
                                +                                      description: The name of the Secret resource being referred to.
                                +                                      type: string
                                +                                    namespace:
                                +                                      description: |-
                                +                                        Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
                                +                                        to the namespace of the referent.
                                +                                      type: string
                                +                                  type: object
                                +                              required:
                                +                                - privateKeySecretRef
                                +                              type: object
                                +                          required:
                                +                            - secretRef
                                +                          type: object
                                +                        serverUrl:
                                +                          description: ServerURL is the chef server URL used to connect to. If using orgs you should include your org in the url and terminate the url with a "/"
                                +                          type: string
                                +                        username:
                                +                          description: UserName should be the user ID on the chef server
                                +                          type: string
                                +                      required:
                                +                        - auth
                                +                        - serverUrl
                                +                        - username
                                +                      type: object
                                                     conjur:
                                @@ -2864,2 +2907,47 @@
                                                         - vault
                                +                      type: object
                                +                    pulumi:
                                +                      description: Pulumi configures this store to sync secrets using the Pulumi provider
                                +                      properties:
                                +                        accessToken:
                                +                          description: AccessToken is the access tokens to sign in to the Pulumi Cloud Console.
                                +                          properties:
                                +                            secretRef:
                                +                              description: SecretRef is a reference to a secret containing the Pulumi API token.
                                +                              properties:
                                +                                key:
                                +                                  description: |-
                                +                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
                                +                                    defaulted, in others it may be required.
                                +                                  type: string
                                +                                name:
                                +                                  description: The name of the Secret resource being referred to.
                                +                                  type: string
                                +                                namespace:
                                +                                  description: |-
                                +                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
                                +                                    to the namespace of the referent.
                                +                                  type: string
                                +                              type: object
                                +                          type: object
                                +                        apiUrl:
                                +                          default: https://api.pulumi.com
                                +                          description: APIURL is the URL of the Pulumi API.
                                +                          type: string
                                +                        environment:
                                +                          description: |-
                                +                            Environment are YAML documents composed of static key-value pairs, programmatic expressions,
                                +                            dynamically retrieved values from supported providers including all major clouds,
                                +                            and other Pulumi ESC environments.
                                +                            To create a new environment, visit https://www.pulumi.com/docs/esc/environments/ for more information.
                                +                          type: string
                                +                        organization:
                                +                          description: |-
                                +                            Organization are a space to collaborate on shared projects and stacks.
                                +                            To create a new organization, visit https://app.pulumi.com/ and click "New Organization".
                                +                          type: string
                                +                      required:
                                +                        - accessToken
                                +                        - environment
                                +                        - organization
                                   description: |-
                                +                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
                                +                                    to the namespace of the referent.
                                +                                  type: string
                                +                              type: object
                                +                          required:
                                +                            - apiKeyRef
                                +                            - passcodeRef
                                +                          type: object
                                +                        environment:
                                +                          default: development
                                +                          description: Environment is the name of an environmnent within a project to pull the secrets from
                                +                          type: string
                                +                        project:
                                +                          default: development
                                +                          description: Project is an onboardbase project that the secrets should be pulled from
                                +                          type: string
                                +                      required:
                                +                        - apiHost
                                +                        - auth
                                +                        - environment
                                +                        - project
                                                       type: object

 PASS  test service monitor     deploy/charts/external-secrets/tests/service_monitor_test.yaml
 PASS  test webhook deployment  deploy/charts/external-secrets/tests/webhook_test.yaml

Snapshot Summary: 1 snapshot failed in 1 test suite. Check changes and use `-u` to update snapshot.

Charts:      1 failed, 0 passed, 1 total
Test Suites: 1 failed, 4 passed, 5 total
Tests:       1 failed, 38 passed, 39 total
Snapshot:    1 failed, 4 passed, 5 total
Time:        829.819164ms

Additional context
The crd tests are failing because no sample is present in the snapshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions