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(issue-221): empty failedTemplateValidator #314

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Mar 21, 2024

proposal #221 and #218

Catch any errror message with failedTemplate: {}

first iteration

suite: Test empty template
templates:
  - validation.yaml
tests:
  - it: should fail when No failed document
    asserts:
    - failedTemplate: {}  // new capability. empty failed template
    - failedTemplate:
            errorMessage: "Please provide someRequiredValue"

  - it: should not fail when value is provided
    set:
      someRequiredValue: "foobar"
    asserts:
    - notFailedTemplate: {}

added parametrised tests to simplify adding more variations

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@ivankatliarchuk ivankatliarchuk changed the title Issue-221: empty failedTemplateValidator feat(issue-221): empty failedTemplateValidator Mar 21, 2024
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* main:
  Simplify code and make documentSelector tests more useful, define all scenario's and update documentation.
  issue-312: documentselector support greedy pattern matching
  issue-312: documentselector support greedy pattern matching
  issue-312: documentselector support greedy pattern matching
  issue-312: documentselector support case with any template
  issue-312: documentselector support cases for inside and outsdie the tests block
  issue-312: documentselector support cases for inside and outsdie the tests block
  fix(issue-312): inline test naming and description
  fix(issue-312): added hasDocuments to test cases
  issue-312: documentselector support cases for inside and outsdie the tests block
  issue-312: documentselector support cases for inside and outsdie the tests block
  issue-312: documentselector support cases for inside and outsdie the tests block
@quintush quintush merged commit e830e69 into helm-unittest:main Apr 29, 2024
3 checks passed
@quintush quintush linked an issue Apr 29, 2024 that may be closed by this pull request
@ivankatliarchuk ivankatliarchuk deleted the issue-221-empty branch April 30, 2024 19:57
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

Successfully merging this pull request may close these issues.

Support assert 'failedTemplate' to catch a generic error message
2 participants