(t *testing.T)
| 240 | } |
| 241 | |
| 242 | func TestReconcileVolumes_ExistingMatch(t *testing.T) { |
| 243 | vol := types.VolumeConfig{Name: "myproject_data", Driver: "local"} |
| 244 | hash, err := VolumeHash(vol) |
| 245 | assert.NilError(t, err) |
| 246 | |
| 247 | project := &types.Project{ |
| 248 | Name: "myproject", |
| 249 | Volumes: types.Volumes{"data": vol}, |
| 250 | } |
| 251 | observed := &ObservedState{ |
| 252 | ProjectName: "myproject", |
| 253 | Containers: map[string][]ObservedContainer{}, |
| 254 | Networks: map[string]ObservedNetwork{}, |
| 255 | Volumes: map[string]ObservedVolume{ |
| 256 | "data": {Name: "myproject_data", ConfigHash: hash}, |
| 257 | }, |
| 258 | } |
| 259 | |
| 260 | plan, err := reconcile(t.Context(), project, observed, defaultReconcileOptions(), noPrompt) |
| 261 | assert.NilError(t, err) |
| 262 | assert.Assert(t, plan.IsEmpty()) |
| 263 | } |
| 264 | |
| 265 | func TestReconcileVolumes_ExternalSkipped(t *testing.T) { |
| 266 | project := &types.Project{ |
nothing calls this directly
no test coverage detected