mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 04:18:53 +00:00
Fixes: #5993 Several tests utilize linux'isms like Mounts, bindmounts, vsock etc. Let's ensure that these are still tested on Linux, but that we also skip these tests when on other operating systems (Darwin). This commit just moves tests; there shouldn't be any functional test changes. While the tests still won't be runnable on Darwin/other hosts yet, this is a necessary step forward. Signed-off-by: Eric Ernst <eric_ernst@apple.com> Signed-off-by: Danny Canter <danny@dcantah.dev>
22 lines
397 B
Go
22 lines
397 B
Go
// Copyright (c) 2017 Intel Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package virtcontainers
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
// cleanUp Removes any stale sandbox/container state that can affect
|
|
// the next test to run.
|
|
func cleanUp() {
|
|
syscall.Unmount(GetSharePath(testSandboxID), syscall.MNT_DETACH|UmountNoFollow)
|
|
os.RemoveAll(testDir)
|
|
os.MkdirAll(testDir, DirMode)
|
|
|
|
setup()
|
|
}
|