mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Update cmdutil_test.go
Modify error reporting format
This commit is contained in:
parent
20affda7f7
commit
d1dd3691c5
@ -17,8 +17,9 @@ limitations under the License.
|
||||
package util
|
||||
|
||||
import (
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
"testing"
|
||||
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
)
|
||||
|
||||
func TestValidateExactArgNumber(t *testing.T) {
|
||||
@ -91,8 +92,13 @@ func TestGetKubeConfigPath(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if GetKubeConfigPath(tt.file) != tt.expected {
|
||||
t.Error("unexpected result")
|
||||
actualResult := GetKubeConfigPath(tt.file)
|
||||
if actualResult != tt.expected {
|
||||
t.Errorf(
|
||||
"failed GetKubeConfigPath:\n\texpected: %s\n\t actual: %s",
|
||||
tt.expected,
|
||||
actualResult,
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user