--- Container tests ---
(t *testing.T)
| 331 | // --- Container tests --- |
| 332 | |
| 333 | func TestReconcileContainers_NewProject(t *testing.T) { |
| 334 | project := &types.Project{ |
| 335 | Name: "myproject", |
| 336 | Services: types.Services{ |
| 337 | "web": {Name: "web", Scale: intPtr(1)}, |
| 338 | }, |
| 339 | } |
| 340 | observed := &ObservedState{ |
| 341 | ProjectName: "myproject", |
| 342 | Containers: map[string][]ObservedContainer{"web": {}}, |
| 343 | Networks: map[string]ObservedNetwork{}, |
| 344 | Volumes: map[string]ObservedVolume{}, |
| 345 | } |
| 346 | |
| 347 | plan, err := reconcile(t.Context(), project, observed, defaultReconcileOptions(), noPrompt) |
| 348 | assert.NilError(t, err) |
| 349 | |
| 350 | assert.Equal(t, plan.String(), strings.TrimSpace(` |
| 351 | [] -> #1 service:web:1, CreateContainer, no existing container |
| 352 | `)+"\n") |
| 353 | } |
| 354 | |
| 355 | func TestReconcileContainers_AlreadyRunning(t *testing.T) { |
| 356 | svc := types.ServiceConfig{Name: "web", Scale: intPtr(1)} |
nothing calls this directly
no test coverage detected