(t *testing.T)
| 155 | } |
| 156 | |
| 157 | func 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 | |
| 171 | type swarmUpdateRecorder struct { |
| 172 | spec swarm.Spec |
nothing calls this directly
no test coverage detected
searching dependent graphs…