mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
integration-cli: remove unused requirements utils
Removes some test functions that were unused: - bridgeNfIP6tables - ambientCapabilities (added to support #26979, which was reverted in #27737) - overlay2Supported Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
4abac69dc6
commit
c887b09abc
1 changed files with 0 additions and 23 deletions
|
@ -84,20 +84,11 @@ func bridgeNfIptables() bool {
|
||||||
return !SysInfo.BridgeNFCallIPTablesDisabled
|
return !SysInfo.BridgeNFCallIPTablesDisabled
|
||||||
}
|
}
|
||||||
|
|
||||||
func bridgeNfIP6tables() bool {
|
|
||||||
return !SysInfo.BridgeNFCallIP6TablesDisabled
|
|
||||||
}
|
|
||||||
|
|
||||||
func unprivilegedUsernsClone() bool {
|
func unprivilegedUsernsClone() bool {
|
||||||
content, err := ioutil.ReadFile("/proc/sys/kernel/unprivileged_userns_clone")
|
content, err := ioutil.ReadFile("/proc/sys/kernel/unprivileged_userns_clone")
|
||||||
return err != nil || !strings.Contains(string(content), "0")
|
return err != nil || !strings.Contains(string(content), "0")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ambientCapabilities() bool {
|
|
||||||
content, err := ioutil.ReadFile("/proc/self/status")
|
|
||||||
return err != nil || strings.Contains(string(content), "CapAmb:")
|
|
||||||
}
|
|
||||||
|
|
||||||
func overlayFSSupported() bool {
|
func overlayFSSupported() bool {
|
||||||
cmd := exec.Command(dockerBinary, "run", "--rm", "busybox", "/bin/sh", "-c", "cat /proc/filesystems")
|
cmd := exec.Command(dockerBinary, "run", "--rm", "busybox", "/bin/sh", "-c", "cat /proc/filesystems")
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
|
@ -107,20 +98,6 @@ func overlayFSSupported() bool {
|
||||||
return bytes.Contains(out, []byte("overlay\n"))
|
return bytes.Contains(out, []byte("overlay\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func overlay2Supported() bool {
|
|
||||||
if !overlayFSSupported() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
daemonV, err := kernel.ParseRelease(testEnv.DaemonInfo.KernelVersion)
|
|
||||||
if err != nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
requiredV := kernel.VersionInfo{Kernel: 4}
|
|
||||||
return kernel.CompareKernelVersion(*daemonV, requiredV) > -1
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if testEnv.IsLocalDaemon() {
|
if testEnv.IsLocalDaemon() {
|
||||||
SysInfo = sysinfo.New(true)
|
SysInfo = sysinfo.New(true)
|
||||||
|
|
Loading…
Add table
Reference in a new issue