Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
make default to be anywhere
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
  • Loading branch information
shubham-cmyk committed Sep 17, 2023
1 parent 26a6ce8 commit 3991f49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/test/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ func (s *Step) Check(namespace string, timeout int) []error {
// Match the expected data (from assert.object) with the extracted data
expectedData, _, _ := unstructured.NestedSlice(expected.object.(runtime.Unstructured).UnstructuredContent(), strings.Split(expected.path, "/")...)

Check failure on line 470 in pkg/test/step.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `unstructured.NestedSlice` is not checked (errcheck)

if expected.stratergy == "" {
expected.stratergy = harness.StrategyAnywhere
}
switch expected.stratergy {
case harness.StrategyAnywhere:
if !contains(data, expectedData) {
Expand All @@ -481,7 +484,6 @@ func (s *Step) Check(namespace string, timeout int) []error {
default:
testErrors = append(testErrors, fmt.Errorf("unknown strategy: %s", expected.stratergy))
}

}

if s.Assert != nil {
Expand Down

0 comments on commit 3991f49

Please sign in to comment.