Skip to content

Commit

Permalink
fix: error manifests discovery error (#483)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Nov 24, 2023
1 parent 4ce7aeb commit da9d9de
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .release-notes/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ Release notes for `TODO`.
- Fixed a kuttl migration failure in case of unsupported file name
- Fixed a potential invalid name when migrating a kuttl test step
- Fixed a manifest discovery issue where manifests could be loaded in the wrong order
- Fixed a manifest discovery issue where error manifests where not discovered correctly
2 changes: 1 addition & 1 deletion pkg/discovery/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestDiscoverTests(t *testing.T) {
}, {
Error: &v1alpha1.Error{
FileRef: v1alpha1.FileRef{
File: "01-error.yaml",
File: "01-errors.yaml",
},
},
}},
Expand Down
4 changes: 2 additions & 2 deletions pkg/discovery/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func LoadTest(fileName string, path string) (*Test, error) {
switch groups[2] {
case "assert":
assertFiles = append(assertFiles, file)
case "error":
case "errors":
errorFiles = append(errorFiles, file)
default:
otherFiles = append(otherFiles, file)
Expand Down Expand Up @@ -140,7 +140,7 @@ func LoadTest(fileName string, path string) (*Test, error) {
FileRef: fileRef,
},
})
case "error":
case "errors":
step.Spec.Try = append(step.Spec.Try, v1alpha1.Operation{
Error: &v1alpha1.Error{
FileRef: fileRef,
Expand Down
4 changes: 2 additions & 2 deletions pkg/discovery/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func TestLoadTest(t *testing.T) {
}, {
Error: &v1alpha1.Error{
FileRef: v1alpha1.FileRef{
File: "01-error.yaml",
File: "01-errors.yaml",
},
},
}},
Expand Down Expand Up @@ -298,7 +298,7 @@ func TestLoadTest(t *testing.T) {
}, {
Error: &v1alpha1.Error{
FileRef: v1alpha1.FileRef{
File: "01-error.yaml",
File: "01-errors.yaml",
},
},
}},
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions testdata/kuttl/01-step.chainsaw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ spec:
apiVersion: v1
kind: Pod
- script:
check: null
content: echo "hello world"
skipLogOutput: true
- command:
args:
- hello world
check: null
entrypoint: echo
skipLogOutput: true

0 comments on commit da9d9de

Please sign in to comment.