forked from helm-unittest/helm-unittest
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from rquinio/feature/assert-schema-validation
Support failedTemplate assert for schema validation errors
- Loading branch information
Showing
16 changed files
with
143 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(*results.TestJobResult)({ | ||
DisplayName: (string) (len=11) "should work", | ||
Index: (int) 0, | ||
Passed: (bool) true, | ||
ExecError: (*errors.errorString)(values don't meet the specifications of the schema(s) in the following chart(s): | ||
with-schema: | ||
- (root): image is required | ||
), | ||
AssertsResult: ([]*results.AssertionResult) (len=1) { | ||
(*results.AssertionResult)({ | ||
Index: (int) 0, | ||
FailInfo: ([]string) { | ||
}, | ||
Passed: (bool) true, | ||
AssertType: (string) (len=14) "failedTemplate", | ||
Not: (bool) false, | ||
CustomInfo: (string) "" | ||
}) | ||
}, | ||
Duration: (time.Duration) 0s | ||
}) |
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
pkg/unittest/.snapshots/TestV3RunJobWithTooLongReleaseName
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(*results.TestJobResult)({ | ||
DisplayName: (string) (len=19) "to long releasename", | ||
Index: (int) 0, | ||
Passed: (bool) false, | ||
ExecError: (*errors.fundamental)(invalid release name, must match regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ and the length must not be longer than 53), | ||
AssertsResult: ([]*results.AssertionResult) (len=1) { | ||
(*results.AssertionResult)({ | ||
Index: (int) 0, | ||
FailInfo: ([]string) (len=2) { | ||
(string) (len=6) "Error:", | ||
(string) (len=84) "\ttemplate \"basic/templates/crd_backup.yaml\" not exists or not selected in test suite" | ||
}, | ||
Passed: (bool) false, | ||
AssertType: (string) (len=12) "hasDocuments", | ||
Not: (bool) false, | ||
CustomInfo: (string) "" | ||
}) | ||
}, | ||
Duration: (time.Duration) 0s | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v2 | ||
description: A chart with a JSON schema | ||
name: with-schema | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"type": "object", | ||
"required": [ | ||
"image" | ||
], | ||
"properties": { | ||
"image": { | ||
"type": "object", | ||
"required": [ | ||
"repository", | ||
"pullPolicy" | ||
], | ||
"properties": { | ||
"repository": { | ||
"type": "string", | ||
"pattern": "^[a-z0-9-_]+$" | ||
}, | ||
"pullPolicy": { | ||
"type": "string", | ||
"pattern": "^(Always|Never|IfNotPresent)$" | ||
} | ||
} | ||
} | ||
} | ||
} |