MCPcopy Create free account
hub / github.com/docker/cli / TestToServicePidsLimit

Function TestToServicePidsLimit

cli/command/service/opts_test.go:267–275  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

265}
266
267func TestToServicePidsLimit(t *testing.T) {
268 flags := newCreateCommand(nil).Flags()
269 opt := newServiceOptions()
270 opt.mode = "replicated"
271 opt.resources.limitPids = 100
272 service, err := opt.ToService(context.Background(), &fakeClient{}, flags)
273 assert.NilError(t, err)
274 assert.Equal(t, service.TaskTemplate.Resources.Limits.Pids, int64(100))
275}
276
277func TestToServiceUpdateRollback(t *testing.T) {
278 expected := swarm.ServiceSpec{

Callers

nothing calls this directly

Calls 3

newServiceOptionsFunction · 0.85
ToServiceMethod · 0.80
newCreateCommandFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…