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

Function TestUpdateIsolationValid

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

Source from the content-addressed store, hash-verified

644}
645
646func TestUpdateIsolationValid(t *testing.T) {
647 flags := newUpdateCommand(nil).Flags()
648 err := flags.Set("isolation", "process")
649 assert.NilError(t, err)
650 spec := swarm.ServiceSpec{
651 TaskTemplate: swarm.TaskSpec{
652 ContainerSpec: &swarm.ContainerSpec{},
653 },
654 }
655 err = updateService(context.Background(), nil, flags, &spec)
656 assert.NilError(t, err)
657 assert.Check(t, is.Equal(container.IsolationProcess, spec.TaskTemplate.ContainerSpec.Isolation))
658}
659
660// TestUpdateLimitsReservations tests that limits and reservations are updated,
661// and that values are not updated are not reset to their default value

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…