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

feat(Test): template tests #159

Merged
merged 20 commits into from
Jul 16, 2024
Merged

feat(Test): template tests #159

merged 20 commits into from
Jul 16, 2024

Conversation

aali309
Copy link
Contributor

@aali309 aali309 commented Jun 26, 2024

see #142

@aali309 aali309 marked this pull request as ready for review June 27, 2024 23:37
@aali309
Copy link
Contributor Author

aali309 commented Jun 27, 2024

Working on TESTING.md to serve as a guide for contributors.

@tthvo
Copy link
Member

tthvo commented Jun 27, 2024

@aali309 We should also create a workflow to run these tests on PR and push. What do you think?

@aali309
Copy link
Contributor Author

aali309 commented Jun 28, 2024

@aali309 We should also create a workflow to run these tests on PR and push. What do you think?

Will do that as well

@tthvo tthvo added the test label Jul 3, 2024
Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good start! I think there are still cases and validations that need covering.

As for the NOTES.txt, you can do the following, for example:

suite: Test NOTES.txt
templates:
  - templates/NOTES.txt

tests:
  - it: should be render correct notes for enabled ingress
    set:
      core.ingress.enabled: true
      core:
        ingress:
          className: nginx
          hosts:
            - host: example.com
              paths:
                - path: /
                  pathType: Prefix
          tls:
            - hosts:
                - example.com
              secretName: example-tls
    asserts:
      - equalRaw:
          value: |


            1. Visit the Cryostat application at:
              ```
              https://example.com/
              ```

charts/cryostat/TESTING.md Outdated Show resolved Hide resolved
charts/cryostat/TESTING.md Show resolved Hide resolved
charts/cryostat/TESTING.md Show resolved Hide resolved
charts/cryostat/tests/clusterrolebinding_test.yaml Outdated Show resolved Hide resolved
charts/cryostat/tests/role_test.yaml Show resolved Hide resolved
charts/cryostat/tests/role_test.yaml Outdated Show resolved Hide resolved
charts/cryostat/tests/role_test.yaml Show resolved Hide resolved
charts/cryostat/tests/rolebinding_test.yaml Show resolved Hide resolved
charts/cryostat/tests/deployment_test.yaml Outdated Show resolved Hide resolved
Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work @aali309!

@aali309
Copy link
Contributor Author

aali309 commented Jul 11, 2024

I will be adding more test cases on this.

@aali309
Copy link
Contributor Author

aali309 commented Jul 16, 2024

ping @andrewazores @ebaron

@andrewazores
Copy link
Member

Looks great! Just the two tiny notes above.

Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! This is awesome!

@andrewazores andrewazores merged commit ea68136 into cryostatio:main Jul 16, 2024
5 checks passed
@aali309 aali309 deleted the unitTests branch July 17, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test test
Projects
No open projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants