MCPcopy Create free account
hub / github.com/cloudflare/cfssl / TestAuthRemoteConfig

Function TestAuthRemoteConfig

config/config_test.go:541–563  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

539}
540
541func 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
565func TestDuplicateRemoteConfig(t *testing.T) {
566 _, err := LoadConfig([]byte(invalidConflictRemoteConfig))

Callers

nothing calls this directly

Calls 2

LoadConfigFunction · 0.85
OverrideRemotesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…