(t *testing.T)
| 539 | } |
| 540 | |
| 541 | func TestAuthRemoteConfig(t *testing.T) { |
| 542 | c, err := LoadConfig([]byte(validMinimalRemoteConfig2)) |
| 543 | if err != nil { |
| 544 | t.Fatal("load valid config failed:", err) |
| 545 | } |
| 546 | |
| 547 | if c.Signing.Default.RemoteServer != "127.0.0.1:8888" { |
| 548 | t.Fatal("load valid config failed: incorrect remote server") |
| 549 | } |
| 550 | |
| 551 | host := "localhost:8888" |
| 552 | c.Signing.OverrideRemotes(host) |
| 553 | |
| 554 | if c.Signing.Default.RemoteServer != host { |
| 555 | t.Fatal("should override default profile's RemoteServer") |
| 556 | } |
| 557 | |
| 558 | for _, p := range c.Signing.Profiles { |
| 559 | if p.RemoteServer != host { |
| 560 | t.Fatal("failed to override profile's RemoteServer") |
| 561 | } |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | func TestDuplicateRemoteConfig(t *testing.T) { |
| 566 | _, err := LoadConfig([]byte(invalidConflictRemoteConfig)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…