(t *testing.T)
| 55 | var _ loader.ResourceLoader = testRemoteLoader{} |
| 56 | |
| 57 | func TestApplyScaleOpt(t *testing.T) { |
| 58 | p := types.Project{ |
| 59 | Services: types.Services{ |
| 60 | "foo": { |
| 61 | Name: "foo", |
| 62 | }, |
| 63 | "bar": { |
| 64 | Name: "bar", |
| 65 | Deploy: &types.DeployConfig{ |
| 66 | Mode: "test", |
| 67 | }, |
| 68 | }, |
| 69 | }, |
| 70 | } |
| 71 | err := applyScaleOpts(&p, []string{"foo=2", "bar=3"}) |
| 72 | assert.NilError(t, err) |
| 73 | foo, err := p.GetService("foo") |
| 74 | assert.NilError(t, err) |
| 75 | assert.Equal(t, *foo.Scale, 2) |
| 76 | |
| 77 | bar, err := p.GetService("bar") |
| 78 | assert.NilError(t, err) |
| 79 | assert.Equal(t, *bar.Scale, 3) |
| 80 | assert.Equal(t, *bar.Deploy.Replicas, 3) |
| 81 | } |
| 82 | |
| 83 | func TestUpOptions_OnExit(t *testing.T) { |
| 84 | tests := []struct { |
nothing calls this directly
no test coverage detected