Skip to content

Commit

Permalink
Fix tests for kubernetes 1.27.x
Browse files Browse the repository at this point in the history
Signed-off-by: Praveen Rewar <[email protected]>
  • Loading branch information
praveenrewar committed Aug 6, 2023
1 parent 0c34e94 commit 13ed099
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/e2e/formatted_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ kapp: Error: create job/successful-job (batch/v1) namespace: default:
replaceUIDs := regexp.MustCompile(`"controller-uid":"[^"]+"`)
out = replaceUIDs.ReplaceAllString(out, "-replaced-")

replaceUIDs = regexp.MustCompile(`"batch\.kubernetes\.io\/controller-uid":"[^"]+"`)
out = replaceUIDs.ReplaceAllString(out, "-replaced-")

require.Containsf(t, out, expectedErr, "Expected to see expected err in output, but did not")
})
}
2 changes: 1 addition & 1 deletion test/e2e/ignore_failing_api_services_flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ metadata:
AllowError: true, IntoNs: true, StdinReader: strings.NewReader(yaml3)})
require.Errorf(t, err, "Expected error when deploying with failing api service")

require.Contains(t, err.Error(), "unable to retrieve the complete list of server APIs: samplekapptest.com/v1: the server is currently unable to handle the request",
require.Contains(t, err.Error(), "unable to retrieve the complete list of server APIs: samplekapptest.com/v1",
"Expected api retrieval error")
})

Expand Down

0 comments on commit 13ed099

Please sign in to comment.