(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestUpdateDockerOnly(t *testing.T) { |
| 34 | cli := makeFakeCli(t) |
| 35 | createTestContext(t, cli, "test", nil) |
| 36 | assert.NilError(t, runUpdate(cli, "test", updateOptions{ |
| 37 | endpoint: map[string]string{ |
| 38 | keyHost: "tcp://some-host", |
| 39 | }, |
| 40 | })) |
| 41 | c, err := cli.ContextStore().GetMetadata("test") |
| 42 | assert.NilError(t, err) |
| 43 | dc, err := command.GetDockerContext(c) |
| 44 | assert.NilError(t, err) |
| 45 | assert.Equal(t, dc.Description, "description of test") |
| 46 | assert.Check(t, is.Contains(c.Endpoints, docker.DockerEndpoint)) |
| 47 | assert.Equal(t, c.Endpoints[docker.DockerEndpoint].(docker.EndpointMeta).Host, "tcp://some-host") |
| 48 | } |
| 49 | |
| 50 | func TestUpdateInvalidDockerHost(t *testing.T) { |
| 51 | cli := makeFakeCli(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…