(t *testing.T)
| 792 | } |
| 793 | |
| 794 | func TestUpdateIsolationInvalid(t *testing.T) { |
| 795 | // validation depends on daemon os / version so validation should be done on the daemon side |
| 796 | flags := newUpdateCommand(nil).Flags() |
| 797 | err := flags.Set("isolation", "test") |
| 798 | assert.NilError(t, err) |
| 799 | spec := swarm.ServiceSpec{ |
| 800 | TaskTemplate: swarm.TaskSpec{ |
| 801 | ContainerSpec: &swarm.ContainerSpec{}, |
| 802 | }, |
| 803 | } |
| 804 | err = updateService(context.Background(), nil, flags, &spec) |
| 805 | assert.NilError(t, err) |
| 806 | assert.Check(t, is.Equal(container.Isolation("test"), spec.TaskTemplate.ContainerSpec.Isolation)) |
| 807 | } |
| 808 | |
| 809 | func TestAddGenericResources(t *testing.T) { |
| 810 | task := &swarm.TaskSpec{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…