Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: matchRegex path name with dot not parsed correctly #207

Open
krithika369 opened this issue Apr 13, 2023 · 3 comments
Open

Regression: matchRegex path name with dot not parsed correctly #207

krithika369 opened this issue Apr 13, 2023 · 3 comments

Comments

@krithika369
Copy link

Hello,

I have a secret resource as follows:

apiVersion: v1
kind: Secret
metadata:
...
stringData:
  config.yaml: |
   ...

Until the official version v0.2.11 of this plugin, I am able to write a test for it like so:

      - matchRegex: # check database address
          path: stringData.[config.yaml]
          pattern: "Host: my-release-abc-postgresql.my-namespace.svc.cluster.local"

But, as of the latest commit, I get the following error:

child name missing at position 11, following "stringData."

No issues if config.yaml is name config-yaml, for example.

It's not a problem for us as we can pin our plugin version to the official release version. But seeing that the test CI job is passing for the recent commits, I wanted to flag this.

Do let me know if you need any other info. Thanks!

@Tarasovych
Copy link

Tarasovych commented Apr 25, 2023

Same issue, I have path: metadata.labels.[app.kubernetes.io/component]

                        Error:
                                child name missing at position 16, following ".labels."
helm plugin list
NAME            VERSION DESCRIPTION                                                                         
unittest        0.3.1   Unit test for helm chart in YAML with ease to keep your chart functional and robust.

@mocdaniel
Copy link

I can confirm this, we are trying to match the contents of data.[somefile.conf] to a given expression.

@Ceddaerrix
Copy link

I think the discussion under issue helm-unittest#196 somewhat relates to what is mentioned here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants