(t *testing.T)
| 251 | } |
| 252 | |
| 253 | func TestUpdateMountsWithDuplicateMounts(t *testing.T) { |
| 254 | flags := newUpdateCommand(nil).Flags() |
| 255 | flags.Set("mount-add", "type=volume,source=vol4,target=/toadd") |
| 256 | |
| 257 | mounts := []mount.Mount{ |
| 258 | {Target: "/tokeep1", Source: "vol1", Type: mount.TypeBind}, |
| 259 | {Target: "/toadd", Source: "vol2", Type: mount.TypeBind}, |
| 260 | {Target: "/tokeep2", Source: "vol3", Type: mount.TypeBind}, |
| 261 | } |
| 262 | |
| 263 | updateMounts(flags, &mounts) |
| 264 | assert.Assert(t, is.Len(mounts, 3)) |
| 265 | assert.Check(t, is.Equal("/tokeep1", mounts[0].Target)) |
| 266 | assert.Check(t, is.Equal("/tokeep2", mounts[1].Target)) |
| 267 | assert.Check(t, is.Equal("/toadd", mounts[2].Target)) |
| 268 | } |
| 269 | |
| 270 | func TestUpdatePorts(t *testing.T) { |
| 271 | flags := newUpdateCommand(nil).Flags() |
nothing calls this directly
no test coverage detected
searching dependent graphs…