mirror of
https://github.com/containers/podman.git
synced 2025-10-25 18:25:59 +08:00
Spelling
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
@ -49,8 +49,8 @@ t GET libpod/volumes/json 200 \
|
||||
t GET libpod/volumes/json?filters=%7B%22name%22%3A%5B%22foo1%22%5D%7D 200 length=1 .[0].Name=foo1
|
||||
# -G --data-urlencode 'filters={"name":["foo1","foo2"]}'
|
||||
t GET libpod/volumes/json?filters=%7B%22name%22%3A%20%5B%22foo1%22%2C%20%22foo2%22%5D%7D 200 length=2 .[0].Name=foo1 .[1].Name=foo2
|
||||
# -G --data-urlencode 'filters={"name":["notexist"]}'
|
||||
t GET libpod/volumes/json?filters=%7B%22name%22%3A%5B%22notexists%22%5D%7D 200 length=0
|
||||
# -G --data-urlencode 'filters={"name":["nonexistent"]}'
|
||||
t GET libpod/volumes/json?filters=%7B%22name%22%3A%5B%22nonexistent%22%5D%7D 200 length=0
|
||||
# -G --data-urlencode 'filters={"label":["testlabel"]}'
|
||||
t GET libpod/volumes/json?filters=%7B%22label%22:%5B%22testlabel%22%5D%7D 200 length=2
|
||||
# -G --data-urlencode 'filters={"label":["testlabel=testonly"]}'
|
||||
@ -63,7 +63,7 @@ t GET libpod/volumes/foo1/json 200 \
|
||||
.Name=foo1 \
|
||||
.Mountpoint=$volumepath/foo1/_data \
|
||||
.CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.*
|
||||
t GET libpod/volumes/notexist/json 404 \
|
||||
t GET libpod/volumes/nonexistent/json 404 \
|
||||
.cause="no such volume" \
|
||||
.message~.* \
|
||||
.response=404
|
||||
|
||||
@ -62,7 +62,7 @@ type PodmanTestIntegration struct {
|
||||
|
||||
var LockTmpDir string
|
||||
|
||||
// PodmanSessionIntegration sturct for command line session
|
||||
// PodmanSessionIntegration struct for command line session
|
||||
type PodmanSessionIntegration struct {
|
||||
*PodmanSession
|
||||
}
|
||||
@ -121,7 +121,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {
|
||||
}
|
||||
}
|
||||
|
||||
// Pull cirros but dont put it into the cache
|
||||
// Pull cirros but don't put it into the cache
|
||||
pullImages := []string{cirros, fedoraToolbox}
|
||||
pullImages = append(pullImages, CACHE_IMAGES...)
|
||||
for _, image := range pullImages {
|
||||
|
||||
@ -60,7 +60,7 @@ var _ = Describe("Podman cp", func() {
|
||||
|
||||
// Copy TO the container.
|
||||
|
||||
// Cannot copy to a non-existent path (note the trailing "/").
|
||||
// Cannot copy to a nonexistent path (note the trailing "/").
|
||||
session = podmanTest.Podman([]string{"cp", srcFile.Name(), name + ":foo/"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).To(ExitWithError())
|
||||
|
||||
@ -233,7 +233,7 @@ var _ = Describe("Podman create", func() {
|
||||
Expect(err).To(BeNil())
|
||||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
podName := "rudoplh"
|
||||
podName := "rudolph"
|
||||
ctrName := "prancer"
|
||||
podIDFile := tmpDir + "pod-id-file"
|
||||
|
||||
@ -337,8 +337,8 @@ var _ = Describe("Podman create", func() {
|
||||
Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
|
||||
})
|
||||
|
||||
It("podman create --authfile with nonexist authfile", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--authfile", "/tmp/nonexist", "--name=foo", ALPINE})
|
||||
It("podman create --authfile with nonexistent authfile", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--authfile", "/tmp/nonexistent", "--name=foo", ALPINE})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).To(Not(Equal(0)))
|
||||
})
|
||||
@ -655,7 +655,7 @@ var _ = Describe("Podman create", func() {
|
||||
session = podmanTest.Podman([]string{"create", "--platform=linux/arm64", "--override-os", "windows", ALPINE})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(125))
|
||||
expectedError = "--platform option can not be specified with --overide-arch or --override-os"
|
||||
expectedError = "--platform option can not be specified with --override-arch or --override-os"
|
||||
Expect(session.ErrorToString()).To(ContainSubstring(expectedError))
|
||||
|
||||
session = podmanTest.Podman([]string{"create", "-q", "--platform=linux/arm64", ALPINE})
|
||||
|
||||
@ -146,17 +146,17 @@ var _ = Describe("Podman images", func() {
|
||||
Expect(result).Should(Exit(0))
|
||||
Expect(len(result.OutputToStringArray())).To(Equal(8))
|
||||
|
||||
retapline := podmanTest.Podman([]string{"images", "-f", "reference=a*pine"})
|
||||
retapline.WaitWithDefaultTimeout()
|
||||
Expect(retapline).Should(Exit(0))
|
||||
Expect(len(retapline.OutputToStringArray())).To(Equal(6))
|
||||
Expect(retapline.LineInOutputContains("alpine")).To(BeTrue())
|
||||
retalpine := podmanTest.Podman([]string{"images", "-f", "reference=a*pine"})
|
||||
retalpine.WaitWithDefaultTimeout()
|
||||
Expect(retalpine).Should(Exit(0))
|
||||
Expect(len(retalpine.OutputToStringArray())).To(Equal(6))
|
||||
Expect(retalpine.LineInOutputContains("alpine")).To(BeTrue())
|
||||
|
||||
retapline = podmanTest.Podman([]string{"images", "-f", "reference=alpine"})
|
||||
retapline.WaitWithDefaultTimeout()
|
||||
Expect(retapline).Should(Exit(0))
|
||||
Expect(len(retapline.OutputToStringArray())).To(Equal(6))
|
||||
Expect(retapline.LineInOutputContains("alpine")).To(BeTrue())
|
||||
retalpine = podmanTest.Podman([]string{"images", "-f", "reference=alpine"})
|
||||
retalpine.WaitWithDefaultTimeout()
|
||||
Expect(retalpine).Should(Exit(0))
|
||||
Expect(len(retalpine.OutputToStringArray())).To(Equal(6))
|
||||
Expect(retalpine.LineInOutputContains("alpine")).To(BeTrue())
|
||||
|
||||
retnone := podmanTest.Podman([]string{"images", "-q", "-f", "reference=bogus"})
|
||||
retnone.WaitWithDefaultTimeout()
|
||||
|
||||
@ -66,7 +66,7 @@ var _ = Describe("Podman login and logout", func() {
|
||||
|
||||
registriesConfWithSearch = []byte(fmt.Sprintf("[registries.search]\nregistries = ['%s']", server))
|
||||
|
||||
testImg = strings.Join([]string{server, "test-apline"}, "/")
|
||||
testImg = strings.Join([]string{server, "test-alpine"}, "/")
|
||||
|
||||
certDirPath = filepath.Join(os.Getenv("HOME"), ".config/containers/certs.d", server)
|
||||
os.MkdirAll(certDirPath, os.ModePerm)
|
||||
@ -155,8 +155,8 @@ var _ = Describe("Podman login and logout", func() {
|
||||
json.Unmarshal(authInfo, &info)
|
||||
fmt.Println(info)
|
||||
|
||||
// push should fail with nonexist authfile
|
||||
session = podmanTest.Podman([]string{"push", "--authfile", "/tmp/nonexist", ALPINE, testImg})
|
||||
// push should fail with nonexistent authfile
|
||||
session = podmanTest.Podman([]string{"push", "--authfile", "/tmp/nonexistent", ALPINE, testImg})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Not(Equal(0)))
|
||||
|
||||
@ -168,8 +168,8 @@ var _ = Describe("Podman login and logout", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
// logout should fail with nonexist authfile
|
||||
session = podmanTest.Podman([]string{"logout", "--authfile", "/tmp/nonexist", server})
|
||||
// logout should fail with nonexistent authfile
|
||||
session = podmanTest.Podman([]string{"logout", "--authfile", "/tmp/nonexistent", server})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Not(Equal(0)))
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ var _ = Describe("Podman mount", func() {
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfNotRootless("This function is not enabled for rootfull podman")
|
||||
SkipIfNotRootless("This function is not enabled for rootful podman")
|
||||
SkipIfRemote("Podman mount not supported for remote connections")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
|
||||
@ -33,7 +33,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("bad network name in disconnect should result in error", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
dis := podmanTest.Podman([]string{"network", "disconnect", "foobar", "test"})
|
||||
dis.WaitWithDefaultTimeout()
|
||||
Expect(dis.ExitCode()).ToNot(BeZero())
|
||||
@ -41,7 +41,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("bad container name in network disconnect should result in error", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
netName := "aliasTest" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", netName})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@ -55,7 +55,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("podman network disconnect", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
netName := "aliasTest" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", netName})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@ -80,7 +80,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("bad network name in connect should result in error", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
dis := podmanTest.Podman([]string{"network", "connect", "foobar", "test"})
|
||||
dis.WaitWithDefaultTimeout()
|
||||
Expect(dis.ExitCode()).ToNot(BeZero())
|
||||
@ -88,7 +88,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("bad container name in network connect should result in error", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
netName := "aliasTest" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", netName})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@ -102,7 +102,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("podman connect on a container that already is connected to the network should error", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
netName := "aliasTest" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", netName})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@ -120,7 +120,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
|
||||
It("podman network connect", func() {
|
||||
SkipIfRemote("This requires a pending PR to be merged before it will work")
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
netName := "aliasTest" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", netName})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@ -152,7 +152,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("podman network connect when not running", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
netName := "aliasTest" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", netName})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@ -181,7 +181,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
|
||||
})
|
||||
|
||||
It("podman network disconnect when not running", func() {
|
||||
SkipIfRootless("network connect and disconnect are only rootfull")
|
||||
SkipIfRootless("network connect and disconnect are only rootful")
|
||||
netName1 := "aliasTest" + stringid.GenerateNonCryptoID()
|
||||
session := podmanTest.Podman([]string{"network", "create", netName1})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
||||
@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
var unknownKindYaml = `
|
||||
apiVerson: v1
|
||||
apiVersion: v1
|
||||
kind: UnknownKind
|
||||
metadata:
|
||||
labels:
|
||||
@ -793,11 +793,11 @@ var _ = Describe("Podman play kube", func() {
|
||||
|
||||
})
|
||||
|
||||
It("podman play kube fail with nonexist authfile", func() {
|
||||
It("podman play kube fail with nonexistent authfile", func() {
|
||||
err := generateKubeYaml("pod", getPod(), kubeYaml)
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
kube := podmanTest.Podman([]string{"play", "kube", "--authfile", "/tmp/nonexist", kubeYaml})
|
||||
kube := podmanTest.Podman([]string{"play", "kube", "--authfile", "/tmp/nonexistent", kubeYaml})
|
||||
kube.WaitWithDefaultTimeout()
|
||||
Expect(kube.ExitCode()).To(Not(Equal(0)))
|
||||
|
||||
@ -1240,7 +1240,7 @@ spec:
|
||||
inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(&podNames[0]), "--format", "'{{ .Config.Cmd }}'"})
|
||||
inspect.WaitWithDefaultTimeout()
|
||||
Expect(inspect.ExitCode()).To(Equal(0))
|
||||
// yaml's command shuold override the image's Entrypoint
|
||||
// yaml's command should override the image's Entrypoint
|
||||
correctCmd := "[" + strings.Join(defaultCtrCmd, " ") + " " + strings.Join(defaultCtrArg, " ")
|
||||
Expect(inspect.OutputToString()).To(ContainSubstring(correctCmd))
|
||||
})
|
||||
@ -1285,7 +1285,7 @@ spec:
|
||||
Expect(inspect.OutputToString()).To(Equal("5000/tcp -> 127.0.0.100:5000"))
|
||||
})
|
||||
|
||||
It("podman play kube test with non-existent empty HostPath type volume", func() {
|
||||
It("podman play kube test with nonexistent empty HostPath type volume", func() {
|
||||
hostPathLocation := filepath.Join(tempdir, "file")
|
||||
|
||||
pod := getPod(withVolume(getHostPathVolume(`""`, hostPathLocation)))
|
||||
@ -1312,7 +1312,7 @@ spec:
|
||||
Expect(kube.ExitCode()).To(Equal(0))
|
||||
})
|
||||
|
||||
It("podman play kube test with non-existent File HostPath type volume", func() {
|
||||
It("podman play kube test with nonexistent File HostPath type volume", func() {
|
||||
hostPathLocation := filepath.Join(tempdir, "file")
|
||||
|
||||
pod := getPod(withVolume(getHostPathVolume("File", hostPathLocation)))
|
||||
|
||||
@ -393,8 +393,8 @@ var _ = Describe("Podman pull", func() {
|
||||
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 4))
|
||||
})
|
||||
|
||||
It("podman pull from docker with nonexist --authfile", func() {
|
||||
session := podmanTest.Podman([]string{"pull", "--authfile", "/tmp/nonexist", ALPINE})
|
||||
It("podman pull from docker with nonexistent --authfile", func() {
|
||||
session := podmanTest.Podman([]string{"pull", "--authfile", "/tmp/nonexistent", ALPINE})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Not(Equal(0)))
|
||||
})
|
||||
@ -506,7 +506,7 @@ var _ = Describe("Podman pull", func() {
|
||||
session = podmanTest.Podman([]string{"pull", "--platform=linux/arm64", "--override-os", "windows", ALPINE})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(125))
|
||||
expectedError = "--platform option can not be specified with --overide-arch or --override-os"
|
||||
expectedError = "--platform option can not be specified with --override-arch or --override-os"
|
||||
Expect(session.ErrorToString()).To(ContainSubstring(expectedError))
|
||||
|
||||
session = podmanTest.Podman([]string{"pull", "-q", "--platform=linux/arm64", ALPINE})
|
||||
|
||||
@ -113,7 +113,7 @@ var _ = Describe("Podman rmi", func() {
|
||||
})
|
||||
|
||||
It("podman rmi image that is a parent of another image", func() {
|
||||
Skip("I need help with this one. i dont understand what is going on")
|
||||
Skip("I need help with this one. i don't understand what is going on")
|
||||
podmanTest.AddImageToRWStore(cirros)
|
||||
session := podmanTest.Podman([]string{"run", "--name", "c_test", cirros, "true"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
||||
@ -1230,8 +1230,8 @@ USER mail`
|
||||
Expect(session).To(ExitWithError())
|
||||
})
|
||||
|
||||
It("podman run should fail with nonexist authfile", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--authfile", "/tmp/nonexist", ALPINE, "ls"})
|
||||
It("podman run should fail with nonexistent authfile", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--authfile", "/tmp/nonexistent", ALPINE, "ls"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Not(Equal(0)))
|
||||
})
|
||||
|
||||
@ -114,12 +114,12 @@ var _ = Describe("podman container runlabel", func() {
|
||||
Expect(result.ExitCode()).To(Equal(0))
|
||||
})
|
||||
|
||||
It("runlabel should fail with nonexist authfile", func() {
|
||||
It("runlabel should fail with nonexistent authfile", func() {
|
||||
image := "podman-runlabel-test:podman"
|
||||
podmanTest.BuildImage(PodmanDockerfile, image, "false")
|
||||
|
||||
// runlabel should fail with nonexist authfile
|
||||
result := podmanTest.Podman([]string{"container", "runlabel", "--authfile", "/tmp/nonexist", "RUN", image})
|
||||
// runlabel should fail with nonexistent authfile
|
||||
result := podmanTest.Podman([]string{"container", "runlabel", "--authfile", "/tmp/nonexistent", "RUN", image})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result.ExitCode()).To(Not(Equal(0)))
|
||||
|
||||
|
||||
@ -430,9 +430,9 @@ registries = ['{{.Host}}:{{.Port}}']`
|
||||
resetRegistriesConfigEnv()
|
||||
})
|
||||
|
||||
// search should fail with nonexist authfile
|
||||
It("podman search fail with nonexist --authfile", func() {
|
||||
search := podmanTest.Podman([]string{"search", "--authfile", "/tmp/nonexist", ALPINE})
|
||||
// search should fail with nonexistent authfile
|
||||
It("podman search fail with nonexistent --authfile", func() {
|
||||
search := podmanTest.Podman([]string{"search", "--authfile", "/tmp/nonexistent", ALPINE})
|
||||
search.WaitWithDefaultTimeout()
|
||||
Expect(search.ExitCode()).To(Not(Equal(0)))
|
||||
})
|
||||
|
||||
@ -140,7 +140,7 @@ var _ = Describe("Podman stats", func() {
|
||||
|
||||
// Regression test for #8265
|
||||
It("podman stats with custom memory limits", func() {
|
||||
// Run thre containers. One with a memory limit. Make sure
|
||||
// Run three containers. One with a memory limit. Make sure
|
||||
// that the limits are different and the limited one has a
|
||||
// lower limit.
|
||||
ctrNoLimit0 := "no-limit-0"
|
||||
|
||||
@ -35,7 +35,7 @@ var _ = Describe("Podman image tree", func() {
|
||||
|
||||
It("podman image tree", func() {
|
||||
SkipIfRemote("Does not work on remote client")
|
||||
Skip("dont understand why this fails")
|
||||
Skip("don't understand why this fails")
|
||||
podmanTest.AddImageToRWStore(cirros)
|
||||
dockerfile := `FROM quay.io/libpod/cirros:latest
|
||||
RUN mkdir hello
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
// TestFramework is used to support commonnly used test features
|
||||
// TestFramework is used to support commonly used test features
|
||||
type TestFramework struct {
|
||||
setup func(*TestFramework) error
|
||||
teardown func(*TestFramework) error
|
||||
|
||||
@ -143,7 +143,7 @@ class TestContainers(unittest.TestCase):
|
||||
top = self.client.containers.get(TestContainers.topContainerId)
|
||||
top.stop()
|
||||
|
||||
# Pause exited container should trow error
|
||||
# Pause exited container should throw error
|
||||
with self.assertRaises(errors.APIError) as error:
|
||||
top.pause()
|
||||
self.assertEqual(error.exception.response.status_code, 500)
|
||||
|
||||
@ -499,7 +499,7 @@ load helpers
|
||||
tar xvf $srcdir/stdout.tar -C $srcdir
|
||||
run cat $srcdir/file.txt
|
||||
is "$output" "$rand_content"
|
||||
run 1 ls $srcfir/empty.txt
|
||||
run 1 ls $srcdir/empty.txt
|
||||
rm -f $srcdir/*
|
||||
|
||||
# Copy directory.
|
||||
|
||||
@ -345,7 +345,7 @@ EOF
|
||||
# all commands after 'podman build' would silently be ignored.
|
||||
# In the test below, prior to #8092, the 'sed' would not get
|
||||
# any input, and we would never see $random3 in the output.
|
||||
# And, we use 'sed' to massage $random3 juuuuust on the remote
|
||||
# And, we use 'sed' to massage $random3 just on the remote
|
||||
# chance that podman itself could pass stdin through.
|
||||
results=$(echo $random3 | (
|
||||
echo $random1
|
||||
|
||||
@ -158,7 +158,7 @@ function check_shell_completion() {
|
||||
;;&
|
||||
|
||||
*PATH* | *CONTEXT* | *KUBEFILE* | *COMMAND* | *ARG...* | *URI*)
|
||||
# default shell completion should be done for everthing which accepts a path
|
||||
# default shell completion should be done for everything which accepts a path
|
||||
run_completion "$@" $cmd "${extra_args[@]}" ""
|
||||
|
||||
# cp is a special case it returns ShellCompDirectiveNoSpace
|
||||
@ -197,7 +197,7 @@ function check_shell_completion() {
|
||||
run_completion "$@" $cmd "${extra_args[@]}" ""
|
||||
_check_completion_end NoFileComp
|
||||
if [ ${#lines[@]} -gt 2 ]; then
|
||||
# checking for line count is not enough since we may inlcude additional debug output
|
||||
# checking for line count is not enough since we may include additional debug output
|
||||
# lines starting with [Debug] are allowed
|
||||
i=0
|
||||
length=$(( ${#lines[@]} - 2 ))
|
||||
|
||||
@ -64,7 +64,7 @@ var _ = Describe("Common functions test", func() {
|
||||
Expect(host.Version).To(Equal(strings.Trim(ver, "\"")))
|
||||
}
|
||||
},
|
||||
Entry("Configure file is not exist.", "/tmp/notexist", "", "", true),
|
||||
Entry("Configure file is not exist.", "/tmp/nonexistent", "", "", true),
|
||||
Entry("Item value with and without \"", "/tmp/os-release.test", "fedora", "\"28\"", false),
|
||||
Entry("Item empty with and without \"", "/tmp/os-release.test", "", "\"\"", false),
|
||||
)
|
||||
@ -142,7 +142,7 @@ var _ = Describe("Common functions test", func() {
|
||||
Expect(Containerized()).To(Equal(expect))
|
||||
},
|
||||
Entry("Set container in env", "", true, false, true),
|
||||
Entry("Can not read from file", "/tmp/notexist", false, false, false),
|
||||
Entry("Can not read from file", "/tmp/nonexistent", false, false, false),
|
||||
Entry("Docker in cgroup file", "/tmp/cgroup.test", false, true, true),
|
||||
Entry("Docker not in cgroup file", "/tmp/cgroup.test", false, true, false),
|
||||
)
|
||||
|
||||
@ -432,7 +432,7 @@ func IsKernelNewerThan(version string) (bool, error) {
|
||||
|
||||
}
|
||||
|
||||
// IsCommandAvaible check if command exist
|
||||
// IsCommandAvailable check if command exist
|
||||
func IsCommandAvailable(command string) bool {
|
||||
check := exec.Command("bash", "-c", strings.Join([]string{"command -v", command}, " "))
|
||||
err := check.Run()
|
||||
|
||||
Reference in New Issue
Block a user