Skip to content

Commit

Permalink
fix(test): fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
joyme123 authored and Pengfei Jiang committed Mar 14, 2023
1 parent 88c1c93 commit 0c69d4a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/util/kubeconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ preferences: {}
users:
- name: kubernetes-admin
user:
as-user-extra: null
client-certificate-data: xxxx
client-key-data: xxxx`
client-key-data: xxxx
`

wantConfig := `apiVersion: v1
clusters:
Expand All @@ -45,6 +47,7 @@ preferences: {}
users:
- name: kubernetes-admin
user:
as-user-extra: null
client-certificate-data: xxxx
client-key-data: xxxx
`
Expand Down Expand Up @@ -86,7 +89,7 @@ users:
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("ReplaceApiServerAddr() got = %v, want %v", got, tt.want)
t.Errorf("ReplaceApiServerAddr() got = %v, want %v", string(got), string(tt.want))
}
})
}
Expand Down

0 comments on commit 0c69d4a

Please sign in to comment.