mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
4c0e0979b4
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>
28 lines
467 B
Go
28 lines
467 B
Go
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())
|
|
}
|