Add test case to cover non-empty auth entry
@@ -389,9 +389,16 @@ func TestLoadFromReaderWithUsernamePassword(t *testing.T) {
Username: "user",
Password: "pass",
}
+
+ for _, tc := range []types.AuthConfig{
+ want,
+ types.AuthConfig{
+ Auth: encodeAuth(&want),
+ },
+ } {
cf := ConfigFile{
AuthConfigs: map[string]types.AuthConfig{
- "example.com/foo": want,
+ "example.com/foo": tc,
},
}
@@ -407,6 +414,7 @@ func TestLoadFromReaderWithUsernamePassword(t *testing.T) {
assert.Check(t, is.DeepEqual(want.Username, got.Username))
assert.Check(t, is.DeepEqual(want.Password, got.Password))
}
+}
func TestCheckKubernetesConfigurationRaiseAnErrorOnInvalidValue(t *testing.T) {
testCases := []struct {
