(t *testing.T)
| 665 | } |
| 666 | |
| 667 | func TestRemoveApplicationWithData(t *testing.T) { |
| 668 | ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) |
| 669 | defer cancel() |
| 670 | |
| 671 | ns, err := docker.NewNamespace("once-removedata-test") |
| 672 | require.NoError(t, err) |
| 673 | defer ns.Teardown(ctx, true) |
| 674 | |
| 675 | require.NoError(t, ns.EnsureNetwork(ctx)) |
| 676 | require.NoError(t, ns.Proxy().Boot(ctx, getProxyPorts(t))) |
| 677 | |
| 678 | app := deployApp(t, ctx, ns, docker.ApplicationSettings{ |
| 679 | Name: "removeapp", |
| 680 | Image: "ghcr.io/basecamp/once-campfire:main", |
| 681 | Host: "removeapp.localhost", |
| 682 | }) |
| 683 | |
| 684 | containerPrefix := "once-removedata-test-app-removeapp-" |
| 685 | assert.Equal(t, 1, countContainers(t, ctx, containerPrefix)) |
| 686 | |
| 687 | require.NoError(t, app.Remove(ctx, true)) |
| 688 | |
| 689 | assert.Equal(t, 0, countContainers(t, ctx, containerPrefix)) |
| 690 | |
| 691 | _, err = docker.FindVolume(ctx, ns, "removeapp") |
| 692 | assert.ErrorIs(t, err, docker.ErrVolumeNotFound) |
| 693 | } |
| 694 | |
| 695 | func TestDeployWithSettings(t *testing.T) { |
| 696 | ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) |
nothing calls this directly
no test coverage detected
searching dependent graphs…