mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix Windows build
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
This commit is contained in:
parent
61b13ba0d1
commit
81f69a5931
2 changed files with 19 additions and 13 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/docker/pkg/parsers/kernel"
|
||||
"github.com/docker/docker/pkg/stringutils"
|
||||
"github.com/go-check/check"
|
||||
"github.com/gotestyourself/gotestyourself/icmd"
|
||||
|
@ -182,15 +181,3 @@ func RemoveOutputForExistingElements(output string, existing []string) string {
|
|||
res := RemoveLinesForExistingElements(strings.Split(output, "\n"), existing)
|
||||
return strings.Join(res, "\n")
|
||||
}
|
||||
|
||||
// GetKernelVersion gets the current kernel version.
|
||||
func GetKernelVersion() *kernel.VersionInfo {
|
||||
v, _ := kernel.ParseRelease(testEnv.DaemonInfo.KernelVersion)
|
||||
return v
|
||||
}
|
||||
|
||||
// CheckKernelVersion checks if current kernel is newer than (or equal to)
|
||||
// the given version.
|
||||
func CheckKernelVersion(k, major, minor int) bool {
|
||||
return kernel.CompareKernelVersion(*GetKernelVersion(), kernel.VersionInfo{Kernel: k, Major: major, Minor: minor}) > 0
|
||||
}
|
||||
|
|
19
integration-cli/utils_unix_test.go
Normal file
19
integration-cli/utils_unix_test.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
// +build linux freebsd solaris openbsd
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/pkg/parsers/kernel"
|
||||
)
|
||||
|
||||
// GetKernelVersion gets the current kernel version.
|
||||
func GetKernelVersion() *kernel.VersionInfo {
|
||||
v, _ := kernel.ParseRelease(testEnv.DaemonInfo.KernelVersion)
|
||||
return v
|
||||
}
|
||||
|
||||
// CheckKernelVersion checks if current kernel is newer than (or equal to)
|
||||
// the given version.
|
||||
func CheckKernelVersion(k, major, minor int) bool {
|
||||
return kernel.CompareKernelVersion(*GetKernelVersion(), kernel.VersionInfo{Kernel: k, Major: major, Minor: minor}) > 0
|
||||
}
|
Loading…
Add table
Reference in a new issue