tests: use existing CRIU version check

Do not re-implement the CRIU version check in the test suite, use it
from libpod/pkg/criu.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber
2018-10-02 14:28:46 +00:00
committed by Adrian Reber
parent 8f6fb79ba8
commit a14155917b
2 changed files with 3 additions and 41 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"os"
"github.com/containers/libpod/pkg/criu"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@ -22,10 +23,8 @@ var _ = Describe("Podman checkpoint", func() {
}
podmanTest = PodmanCreate(tempdir)
podmanTest.RestoreAllArtifacts()
// At least CRIU 3.11 is needed
skip, err := podmanTest.isCriuAtLeast(31100)
if err != nil || skip {
Skip("CRIU missing or too old.")
if !criu.CheckForCriu() {
Skip("CRIU is missing or too old.")
}
})