mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #49441 from zhangxiaoyu-zidif/fix-err-message-for-gettest
Automatic merge from submit-queue (batch tested with PRs 49885, 49751, 49441, 49952, 49945) Fix error format and info for get_test.go **What this PR does / why we need it**: Fix error format and info for get_test.go **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
c2a83c3e1c
@ -140,7 +140,7 @@ func TestGetUnknownSchemaObject(t *testing.T) {
|
||||
expected := []runtime.Object{cmdtesting.NewInternalType("", "", "foo")}
|
||||
actual := tf.Printer.(*testPrinter).Objects
|
||||
if len(actual) != len(expected) {
|
||||
t.Fatal(actual)
|
||||
t.Fatalf("expected: %#v, but actual: %#v", expected, actual)
|
||||
}
|
||||
for i, obj := range actual {
|
||||
expectedJSON := runtime.EncodeOrDie(codec, expected[i])
|
||||
@ -156,7 +156,7 @@ func TestGetUnknownSchemaObject(t *testing.T) {
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(expectedMap, actualMap) {
|
||||
t.Errorf("unexpected object: \n%#v\n%#v", expectedMap, actualMap)
|
||||
t.Errorf("expectedMap: %#v, but actualMap: %#v", expectedMap, actualMap)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user