(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func TestReconcileNetworks_ExistingMatch(t *testing.T) { |
| 71 | nw := types.NetworkConfig{Name: "myproject_frontend"} |
| 72 | hash, err := NetworkHash(&nw) |
| 73 | assert.NilError(t, err) |
| 74 | |
| 75 | project := &types.Project{ |
| 76 | Name: "myproject", |
| 77 | Networks: types.Networks{"frontend": nw}, |
| 78 | } |
| 79 | observed := &ObservedState{ |
| 80 | ProjectName: "myproject", |
| 81 | Containers: map[string][]ObservedContainer{}, |
| 82 | Networks: map[string]ObservedNetwork{ |
| 83 | "frontend": {ID: "net1", Name: "myproject_frontend", ConfigHash: hash}, |
| 84 | }, |
| 85 | Volumes: map[string]ObservedVolume{}, |
| 86 | } |
| 87 | |
| 88 | plan, err := reconcile(t.Context(), project, observed, defaultReconcileOptions(), noPrompt) |
| 89 | assert.NilError(t, err) |
| 90 | assert.Assert(t, plan.IsEmpty()) |
| 91 | } |
| 92 | |
| 93 | func TestReconcileNetworks_ExternalSkipped(t *testing.T) { |
| 94 | project := &types.Project{ |
nothing calls this directly
no test coverage detected