github.com/dmaizel/tests@v0.0.0-20210728163746-cae6a2d9cee8/integration/docker/info_test.go (about) 1 // Copyright (c) 2018 Intel Corporation 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 5 package docker 6 7 import ( 8 "regexp" 9 "strings" 10 11 . "github.com/kata-containers/tests" 12 . "github.com/onsi/ginkgo" 13 . "github.com/onsi/gomega" 14 ) 15 16 var _ = Describe("info", func() { 17 var ( 18 stdout string 19 exitCode int 20 ) 21 22 Context("docker info", func() { 23 It("should has a runtime information", func() { 24 stdout, _, exitCode = dockerInfo() 25 Expect(exitCode).To(Equal(0)) 26 matchStdout := regexp.MustCompile("Runtimes: .*").FindString(stdout) 27 checkRuntime := strings.Contains(matchStdout, Runtime) 28 Expect(checkRuntime).To(BeTrue()) 29 }) 30 }) 31 })