(t *testing.T)
| 307 | } |
| 308 | |
| 309 | func TestJSONReaderNoFile(t *testing.T) { |
| 310 | js := ` { "auths": { "https://index.docker.io/v1/": { "auth": "am9lam9lOmhlbGxv", "email": "user@example.com" } } }` |
| 311 | |
| 312 | config, err := LoadFromReader(strings.NewReader(js)) |
| 313 | assert.NilError(t, err) |
| 314 | |
| 315 | ac := config.AuthConfigs["https://index.docker.io/v1/"] |
| 316 | assert.Equal(t, ac.Username, "joejoe") |
| 317 | assert.Equal(t, ac.Password, "hello") |
| 318 | } |
| 319 | |
| 320 | func TestJSONWithPsFormatNoFile(t *testing.T) { |
| 321 | js := `{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…