(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestUpdateDescriptionOnly(t *testing.T) { |
| 13 | cli := makeFakeCli(t) |
| 14 | err := runCreate(cli, "test", createOptions{ |
| 15 | endpoint: map[string]string{}, |
| 16 | }) |
| 17 | assert.NilError(t, err) |
| 18 | cli.OutBuffer().Reset() |
| 19 | cli.ErrBuffer().Reset() |
| 20 | assert.NilError(t, runUpdate(cli, "test", updateOptions{ |
| 21 | description: "description", |
| 22 | })) |
| 23 | c, err := cli.ContextStore().GetMetadata("test") |
| 24 | assert.NilError(t, err) |
| 25 | dc, err := command.GetDockerContext(c) |
| 26 | assert.NilError(t, err) |
| 27 | assert.Equal(t, dc.Description, "description") |
| 28 | |
| 29 | assert.Equal(t, "test\n", cli.OutBuffer().String()) |
| 30 | assert.Equal(t, "Successfully updated context \"test\"\n", cli.ErrBuffer().String()) |
| 31 | } |
| 32 | |
| 33 | func TestUpdateDockerOnly(t *testing.T) { |
| 34 | cli := makeFakeCli(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…