(t *testing.T)
| 929 | } |
| 930 | |
| 931 | func TestUpdateMaxReplicas(t *testing.T) { |
| 932 | ctx := context.Background() |
| 933 | |
| 934 | svc := swarm.ServiceSpec{ |
| 935 | TaskTemplate: swarm.TaskSpec{ |
| 936 | ContainerSpec: &swarm.ContainerSpec{}, |
| 937 | Placement: &swarm.Placement{ |
| 938 | MaxReplicas: 1, |
| 939 | }, |
| 940 | }, |
| 941 | } |
| 942 | |
| 943 | flags := newUpdateCommand(nil).Flags() |
| 944 | flags.Set(flagMaxReplicas, "2") |
| 945 | err := updateService(ctx, nil, flags, &svc) |
| 946 | assert.NilError(t, err) |
| 947 | |
| 948 | assert.DeepEqual(t, svc.TaskTemplate.Placement, &swarm.Placement{MaxReplicas: uint64(2)}) |
| 949 | } |
| 950 | |
| 951 | func TestUpdateSysCtls(t *testing.T) { |
| 952 | ctx := context.Background() |
nothing calls this directly
no test coverage detected
searching dependent graphs…