(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestUpdateServiceArgs(t *testing.T) { |
| 22 | flags := newUpdateCommand(nil).Flags() |
| 23 | flags.Set("args", "the \"new args\"") |
| 24 | |
| 25 | spec := &swarm.ServiceSpec{ |
| 26 | TaskTemplate: swarm.TaskSpec{ |
| 27 | ContainerSpec: &swarm.ContainerSpec{}, |
| 28 | }, |
| 29 | } |
| 30 | cspec := spec.TaskTemplate.ContainerSpec |
| 31 | cspec.Args = []string{"old", "args"} |
| 32 | |
| 33 | updateService(context.TODO(), nil, flags, spec) |
| 34 | assert.Check(t, is.DeepEqual([]string{"the", "new args"}, cspec.Args)) |
| 35 | } |
| 36 | |
| 37 | func TestUpdateLabels(t *testing.T) { |
| 38 | flags := newUpdateCommand(nil).Flags() |
nothing calls this directly
no test coverage detected
searching dependent graphs…