From c887b09abc7d4ae149a9c314f74f9c351ac4cba2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 8 Jul 2019 18:58:46 +0200 Subject: [PATCH] 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 --- integration-cli/requirements_unix_test.go | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/integration-cli/requirements_unix_test.go b/integration-cli/requirements_unix_test.go index cea1db1e6d..c309824de7 100644 --- a/integration-cli/requirements_unix_test.go +++ b/integration-cli/requirements_unix_test.go @@ -84,20 +84,11 @@ func bridgeNfIptables() bool { return !SysInfo.BridgeNFCallIPTablesDisabled } -func bridgeNfIP6tables() bool { - return !SysInfo.BridgeNFCallIP6TablesDisabled -} - func unprivilegedUsernsClone() bool { content, err := ioutil.ReadFile("/proc/sys/kernel/unprivileged_userns_clone") 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 { cmd := exec.Command(dockerBinary, "run", "--rm", "busybox", "/bin/sh", "-c", "cat /proc/filesystems") out, err := cmd.CombinedOutput() @@ -107,20 +98,6 @@ func overlayFSSupported() bool { 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() { if testEnv.IsLocalDaemon() { SysInfo = sysinfo.New(true)