MCPcopy Index your code
hub / github.com/docker/cli / TestUpdateIsolationInvalid

Function TestUpdateIsolationInvalid

cli/command/service/update_test.go:794–807  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

792}
793
794func 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
809func TestAddGenericResources(t *testing.T) {
810 task := &swarm.TaskSpec{}

Callers

nothing calls this directly

Calls 3

updateServiceFunction · 0.85
newUpdateCommandFunction · 0.70
SetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…