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>
| ... | ... |
@@ -84,20 +84,11 @@ func bridgeNfIptables() bool {
|
| 84 | 84 |
return !SysInfo.BridgeNFCallIPTablesDisabled |
| 85 | 85 |
} |
| 86 | 86 |
|
| 87 |
-func bridgeNfIP6tables() bool {
|
|
| 88 |
- return !SysInfo.BridgeNFCallIP6TablesDisabled |
|
| 89 |
-} |
|
| 90 |
- |
|
| 91 | 87 |
func unprivilegedUsernsClone() bool {
|
| 92 | 88 |
content, err := ioutil.ReadFile("/proc/sys/kernel/unprivileged_userns_clone")
|
| 93 | 89 |
return err != nil || !strings.Contains(string(content), "0") |
| 94 | 90 |
} |
| 95 | 91 |
|
| 96 |
-func ambientCapabilities() bool {
|
|
| 97 |
- content, err := ioutil.ReadFile("/proc/self/status")
|
|
| 98 |
- return err != nil || strings.Contains(string(content), "CapAmb:") |
|
| 99 |
-} |
|
| 100 |
- |
|
| 101 | 92 |
func overlayFSSupported() bool {
|
| 102 | 93 |
cmd := exec.Command(dockerBinary, "run", "--rm", "busybox", "/bin/sh", "-c", "cat /proc/filesystems") |
| 103 | 94 |
out, err := cmd.CombinedOutput() |
| ... | ... |
@@ -107,20 +98,6 @@ func overlayFSSupported() bool {
|
| 107 | 107 |
return bytes.Contains(out, []byte("overlay\n"))
|
| 108 | 108 |
} |
| 109 | 109 |
|
| 110 |
-func overlay2Supported() bool {
|
|
| 111 |
- if !overlayFSSupported() {
|
|
| 112 |
- return false |
|
| 113 |
- } |
|
| 114 |
- |
|
| 115 |
- daemonV, err := kernel.ParseRelease(testEnv.DaemonInfo.KernelVersion) |
|
| 116 |
- if err != nil {
|
|
| 117 |
- return false |
|
| 118 |
- } |
|
| 119 |
- requiredV := kernel.VersionInfo{Kernel: 4}
|
|
| 120 |
- return kernel.CompareKernelVersion(*daemonV, requiredV) > -1 |
|
| 121 |
- |
|
| 122 |
-} |
|
| 123 |
- |
|
| 124 | 110 |
func init() {
|
| 125 | 111 |
if testEnv.IsLocalDaemon() {
|
| 126 | 112 |
SysInfo = sysinfo.New(true) |