mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-09-30 11:27:43 +02:00
Add missing tests for bucket util (#565)
* Add CheckDeepEqual test util * Fix for srcContext with slash suffix * Add tests for bucket_util.go
This commit is contained in:
@@ -41,6 +41,14 @@ func SetupFiles(path string, files map[string]string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func CheckDeepEqual(t *testing.T, expected, actual interface{}) {
|
||||
t.Helper()
|
||||
if diff := cmp.Diff(actual, expected); diff != "" {
|
||||
t.Errorf("%T differ (-got, +want): %s", expected, diff)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func CheckErrorAndDeepEqual(t *testing.T, shouldErr bool, err error, expected, actual interface{}) {
|
||||
t.Helper()
|
||||
if err := checkErr(shouldErr, err); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user