MCPcopy Create free account
hub / github.com/docker/cli / TestDisplayTrustRoot

Function TestDisplayTrustRoot

cli/command/swarm/ca_test.go:157–169  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

155}
156
157func TestDisplayTrustRoot(t *testing.T) {
158 buffer := new(bytes.Buffer)
159 trustRoot := "trustme"
160 err := displayTrustRoot(buffer, client.SwarmInspectResult{
161 Swarm: swarm.Swarm{
162 ClusterInfo: swarm.ClusterInfo{
163 TLSInfo: swarm.TLSInfo{TrustRoot: trustRoot},
164 },
165 },
166 })
167 assert.NilError(t, err)
168 assert.Check(t, is.Equal(trustRoot+"\n", buffer.String()))
169}
170
171type swarmUpdateRecorder struct {
172 spec swarm.Spec

Callers

nothing calls this directly

Calls 2

displayTrustRootFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…