mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 12:41:42 +00:00
Ignore cleanup with /dev/mapper does not exist
This commit is contained in:
+5
-1
@@ -121,6 +121,10 @@ func cleanupDevMapper() error {
|
||||
// Remove any leftover devmapper devices from previous unit run tests
|
||||
infos, err := ioutil.ReadDir("/dev/mapper")
|
||||
if err != nil {
|
||||
// If the mapper file does not exist there is nothing to clean up
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
pools := []string{}
|
||||
@@ -148,7 +152,7 @@ func init() {
|
||||
os.Setenv("TEST", "1")
|
||||
os.Setenv("DOCKER_LOOPBACK_DATA_SIZE", "209715200") // 200MB
|
||||
os.Setenv("DOCKER_LOOPBACK_META_SIZE", "104857600") // 100MB
|
||||
os.Setenv("DOCKER_BASE_FS_SIZE", "157286400") // 150MB
|
||||
os.Setenv("DOCKER_BASE_FS_SIZE", "157286400") // 150MB
|
||||
|
||||
// Hack to run sys init during unit testing
|
||||
if selfPath := utils.SelfPath(); selfPath == "/sbin/init" || selfPath == "/.dockerinit" {
|
||||
|
||||
Reference in New Issue
Block a user