diff options
| author | Brian Goff <cpuguy83@gmail.com> | 2022-09-30 22:30:58 +0000 |
|---|---|---|
| committer | Brian Goff <cpuguy83@gmail.com> | 2022-09-30 22:30:58 +0000 |
| commit | 4c0e0979b4f54972f8b89200078d691c68bd7f3e (patch) | |
| tree | 42782580f90fd340299453e0a416886b86b7b6f9 /integration/daemon/main_test.go | |
| parent | 62bc40c6e722f835310911c2d9f21167d033778b (diff) | |
| download | docker-4c0e0979b4f54972f8b89200078d691c68bd7f3e.tar.gz | |
Fix live-restore w/ restart policies + volume refs
Before this change restarting the daemon in live-restore with running
containers + a restart policy meant that volume refs were not restored.
This specifically happens when the container is still running *and*
there is a restart policy that would make sure the container was running
again on restart.
The bug allows volumes to be removed even though containers are
referencing them. 😱
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Diffstat (limited to 'integration/daemon/main_test.go')
| -rw-r--r-- | integration/daemon/main_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/integration/daemon/main_test.go b/integration/daemon/main_test.go index 74a342e298..6fb7250a0f 100644 --- a/integration/daemon/main_test.go +++ b/integration/daemon/main_test.go @@ -1,10 +1,28 @@ package daemon // import "github.com/docker/docker/integration/daemon" import ( + "fmt" "os" "testing" + + "github.com/docker/docker/testutil/environment" ) +var testEnv *environment.Execution + func TestMain(m *testing.M) { + var err error + testEnv, err = environment.New() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + err = environment.EnsureFrozenImagesLinux(testEnv) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + testEnv.Print() os.Exit(m.Run()) } |
