diff options
-rw-r--r-- | .cirrus.yml | 6 | ||||
-rwxr-xr-x | API.md | 216 | ||||
-rw-r--r-- | contrib/cirrus/packer/fedora_setup.sh | 3 | ||||
-rw-r--r-- | contrib/cirrus/packer/ubuntu_setup.sh | 3 | ||||
-rw-r--r-- | contrib/gate/Dockerfile | 5 | ||||
-rw-r--r-- | docs/varlink/apidoc.go | 2 | ||||
-rw-r--r-- | test/e2e/cp_test.go | 44 |
7 files changed, 136 insertions, 143 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index f3a0776db..e36b4f484 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -31,9 +31,9 @@ env: #### #### Cache-image names to test with ### - FEDORA_CACHE_IMAGE_NAME: "fedora-29-libpod-5170730531028992" - PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-28-libpod-5170730531028992" - UBUNTU_CACHE_IMAGE_NAME: "ubuntu-18-libpod-5170730531028992" + FEDORA_CACHE_IMAGE_NAME: "fedora-29-libpod-5171433328607232" + PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-28-libpod-5171433328607232" + UBUNTU_CACHE_IMAGE_NAME: "ubuntu-18-libpod-5171433328607232" #### #### Variables for composing new cache-images (used in PR testing) from @@ -147,7 +147,7 @@ in the [API.md](https://github.com/containers/libpod/blob/master/API.md) file in [func RestartPod(name: string) string](#RestartPod) -[func SearchImages(query: string, limit: , filter: ImageSearchFilter) ImageSearchResult](#SearchImages) +[func SearchImages(query: string, limit: ?int, filter: ImageSearchFilter) ImageSearchResult](#SearchImages) [func SendFile(type: string, length: int) string](#SendFile) @@ -1012,7 +1012,7 @@ $ varlink call -m unix:/run/podman/io.podman/io.podman.RestartPod '{"name": "135 ### <a name="SearchImages"></a>func SearchImages <div style="background-color: #E8E8E8; padding: 15px; margin: 10px; border-radius: 10px;"> -method SearchImages(query: [string](https://godoc.org/builtin#string), limit: [](#), filter: [ImageSearchFilter](#ImageSearchFilter)) [ImageSearchResult](#ImageSearchResult)</div> +method SearchImages(query: [string](https://godoc.org/builtin#string), limit: [?int](#?int), filter: [ImageSearchFilter](#ImageSearchFilter)) [ImageSearchResult](#ImageSearchResult)</div> SearchImages searches available registries for images that contain the contents of "query" in their name. If "limit" is given, limits the amount of search results per registry. @@ -1352,197 +1352,197 @@ Create is an input structure for creating containers. args [[]string](#[]string) -addHost [](#) +addHost [?[]string](#?[]string) -annotation [](#) +annotation [?[]string](#?[]string) -attach [](#) +attach [?[]string](#?[]string) -blkioWeight [](#) +blkioWeight [?string](#?string) -blkioWeightDevice [](#) +blkioWeightDevice [?[]string](#?[]string) -capAdd [](#) +capAdd [?[]string](#?[]string) -capDrop [](#) +capDrop [?[]string](#?[]string) -cgroupParent [](#) +cgroupParent [?string](#?string) -cidFile [](#) +cidFile [?string](#?string) -conmonPidfile [](#) +conmonPidfile [?string](#?string) -command [](#) +command [?[]string](#?[]string) -cpuPeriod [](#) +cpuPeriod [?int](#?int) -cpuQuota [](#) +cpuQuota [?int](#?int) -cpuRtPeriod [](#) +cpuRtPeriod [?int](#?int) -cpuRtRuntime [](#) +cpuRtRuntime [?int](#?int) -cpuShares [](#) +cpuShares [?int](#?int) -cpus [](#) +cpus [?float](#?float) -cpuSetCpus [](#) +cpuSetCpus [?string](#?string) -cpuSetMems [](#) +cpuSetMems [?string](#?string) -detach [](#) +detach [?bool](#?bool) -detachKeys [](#) +detachKeys [?string](#?string) -device [](#) +device [?[]string](#?[]string) -deviceReadBps [](#) +deviceReadBps [?[]string](#?[]string) -deviceReadIops [](#) +deviceReadIops [?[]string](#?[]string) -deviceWriteBps [](#) +deviceWriteBps [?[]string](#?[]string) -deviceWriteIops [](#) +deviceWriteIops [?[]string](#?[]string) -dns [](#) +dns [?[]string](#?[]string) -dnsOpt [](#) +dnsOpt [?[]string](#?[]string) -dnsSearch [](#) +dnsSearch [?[]string](#?[]string) -dnsServers [](#) +dnsServers [?[]string](#?[]string) -entrypoint [](#) +entrypoint [?string](#?string) -env [](#) +env [?[]string](#?[]string) -envFile [](#) +envFile [?[]string](#?[]string) -expose [](#) +expose [?[]string](#?[]string) -gidmap [](#) +gidmap [?[]string](#?[]string) -groupadd [](#) +groupadd [?[]string](#?[]string) -healthcheckCommand [](#) +healthcheckCommand [?string](#?string) -healthcheckInterval [](#) +healthcheckInterval [?string](#?string) -healthcheckRetries [](#) +healthcheckRetries [?int](#?int) -healthcheckStartPeriod [](#) +healthcheckStartPeriod [?string](#?string) -healthcheckTimeout [](#) +healthcheckTimeout [?string](#?string) -hostname [](#) +hostname [?string](#?string) -imageVolume [](#) +imageVolume [?string](#?string) -init [](#) +init [?bool](#?bool) -initPath [](#) +initPath [?string](#?string) -interactive [](#) +interactive [?bool](#?bool) -ip [](#) +ip [?string](#?string) -ipc [](#) +ipc [?string](#?string) -kernelMemory [](#) +kernelMemory [?string](#?string) -label [](#) +label [?[]string](#?[]string) -labelFile [](#) +labelFile [?[]string](#?[]string) -logDriver [](#) +logDriver [?string](#?string) -logOpt [](#) +logOpt [?[]string](#?[]string) -macAddress [](#) +macAddress [?string](#?string) -memory [](#) +memory [?string](#?string) -memoryReservation [](#) +memoryReservation [?string](#?string) -memorySwap [](#) +memorySwap [?string](#?string) -memorySwappiness [](#) +memorySwappiness [?int](#?int) -name [](#) +name [?string](#?string) -net [](#) +net [?string](#?string) -network [](#) +network [?string](#?string) -noHosts [](#) +noHosts [?bool](#?bool) -oomKillDisable [](#) +oomKillDisable [?bool](#?bool) -oomScoreAdj [](#) +oomScoreAdj [?int](#?int) -pid [](#) +pid [?string](#?string) -pidsLimit [](#) +pidsLimit [?int](#?int) -pod [](#) +pod [?string](#?string) -privileged [](#) +privileged [?bool](#?bool) -publish [](#) +publish [?[]string](#?[]string) -publishAll [](#) +publishAll [?bool](#?bool) -quiet [](#) +quiet [?bool](#?bool) -readonly [](#) +readonly [?bool](#?bool) -readonlytmpfs [](#) +readonlytmpfs [?bool](#?bool) -restart [](#) +restart [?string](#?string) -rm [](#) +rm [?bool](#?bool) -rootfs [](#) +rootfs [?bool](#?bool) -securityOpt [](#) +securityOpt [?[]string](#?[]string) -shmSize [](#) +shmSize [?string](#?string) -stopSignal [](#) +stopSignal [?string](#?string) -stopTimeout [](#) +stopTimeout [?int](#?int) -storageOpt [](#) +storageOpt [?[]string](#?[]string) -subuidname [](#) +subuidname [?string](#?string) -subgidname [](#) +subgidname [?string](#?string) -sysctl [](#) +sysctl [?[]string](#?[]string) -systemd [](#) +systemd [?bool](#?bool) -tmpfs [](#) +tmpfs [?[]string](#?[]string) -tty [](#) +tty [?bool](#?bool) -uidmap [](#) +uidmap [?[]string](#?[]string) -ulimit [](#) +ulimit [?[]string](#?[]string) -user [](#) +user [?string](#?string) -userns [](#) +userns [?string](#?string) -uts [](#) +uts [?string](#?string) -mount [](#) +mount [?[]string](#?[]string) -volume [](#) +volume [?[]string](#?[]string) -volumesFrom [](#) +volumesFrom [?[]string](#?[]string) -workDir [](#) +workDir [?string](#?string) ### <a name="DiffInfo"></a>type DiffInfo @@ -1628,9 +1628,9 @@ compress [bool](https://godoc.org/builtin#bool) -is_official [](#) +is_official [?bool](#?bool) -is_automated [](#) +is_automated [?bool](#?bool) star_count [int](https://godoc.org/builtin#int) ### <a name="ImageSearchResult"></a>type ImageSearchResult @@ -1882,21 +1882,21 @@ mounts [string](https://godoc.org/builtin#string) all [bool](https://godoc.org/builtin#bool) -filters [](#) +filters [?[]string](#?[]string) -last [](#) +last [?int](#?int) -latest [](#) +latest [?bool](#?bool) -noTrunc [](#) +noTrunc [?bool](#?bool) -pod [](#) +pod [?bool](#?bool) -quiet [](#) +quiet [?bool](#?bool) -sort [](#) +sort [?string](#?string) -sync [](#) +sync [?bool](#?bool) ### <a name="Runlabel"></a>type Runlabel Runlabel describes the required input for container runlabel diff --git a/contrib/cirrus/packer/fedora_setup.sh b/contrib/cirrus/packer/fedora_setup.sh index e031129d7..33e240895 100644 --- a/contrib/cirrus/packer/fedora_setup.sh +++ b/contrib/cirrus/packer/fedora_setup.sh @@ -66,7 +66,8 @@ ooe.sh sudo dnf install -y \ unzip \ vim \ which \ - xz + xz \ + zip install_varlink diff --git a/contrib/cirrus/packer/ubuntu_setup.sh b/contrib/cirrus/packer/ubuntu_setup.sh index 56d7f962e..17e274d97 100644 --- a/contrib/cirrus/packer/ubuntu_setup.sh +++ b/contrib/cirrus/packer/ubuntu_setup.sh @@ -86,7 +86,8 @@ ooe.sh sudo -E apt-get -qq install \ socat \ unzip \ vim \ - xz-utils + xz-utils \ + zip echo "Fixing Ubuntu kernel not enabling swap accounting by default" SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1"/g' diff --git a/contrib/gate/Dockerfile b/contrib/gate/Dockerfile index e44c2fd4f..9a6f5dc8d 100644 --- a/contrib/gate/Dockerfile +++ b/contrib/gate/Dockerfile @@ -31,11 +31,12 @@ RUN dnf -y install \ python3-pytoml \ python3-pyyaml \ python3-varlink \ - containers-common \ - slirp4netns \ rsync \ + slirp4netns \ + unzip \ which \ xz \ + zip \ && dnf clean all ENV GOPATH="/go" \ diff --git a/docs/varlink/apidoc.go b/docs/varlink/apidoc.go index 7f1d60bc8..884ce54fe 100644 --- a/docs/varlink/apidoc.go +++ b/docs/varlink/apidoc.go @@ -44,6 +44,8 @@ func typeToString(input *idl.Type) string { return "map[string]" case idl.TypeInt: return "int" + case idl.TypeMaybe: + return fmt.Sprintf("?%s", typeToString(input.ElementType)) } return "" } diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go index 1dfa8f50d..71fc064a5 100644 --- a/test/e2e/cp_test.go +++ b/test/e2e/cp_test.go @@ -39,11 +39,10 @@ var _ = Describe("Podman cp", func() { }) It("podman cp file", func() { - path, err := os.Getwd() - Expect(err).To(BeNil()) - filePath := filepath.Join(path, "cp_test.txt") + srcPath := filepath.Join(podmanTest.RunRoot, "cp_test.txt") + dstPath := filepath.Join(podmanTest.RunRoot, "cp_from_container") fromHostToContainer := []byte("copy from host to container") - err = ioutil.WriteFile(filePath, fromHostToContainer, 0644) + err := ioutil.WriteFile(srcPath, fromHostToContainer, 0644) Expect(err).To(BeNil()) session := podmanTest.Podman([]string{"create", ALPINE, "cat", "foo"}) @@ -51,24 +50,22 @@ var _ = Describe("Podman cp", func() { Expect(session.ExitCode()).To(Equal(0)) name := session.OutputToString() - session = podmanTest.Podman([]string{"cp", filepath.Join(path, "cp_test.txt"), name + ":foo"}) + session = podmanTest.Podman([]string{"cp", srcPath, name + ":foo"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - session = podmanTest.Podman([]string{"cp", name + ":foo", filepath.Join(path, "cp_from_container")}) + session = podmanTest.Podman([]string{"cp", name + ":foo", dstPath}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - - os.Remove("cp_from_container") - os.Remove("cp_test.txt") }) It("podman cp file to dir", func() { - path, err := os.Getwd() - Expect(err).To(BeNil()) - filePath := filepath.Join(path, "cp_test.txt") + srcPath := filepath.Join(podmanTest.RunRoot, "cp_test.txt") + dstDir := filepath.Join(podmanTest.RunRoot, "receive") fromHostToContainer := []byte("copy from host to container directory") - err = ioutil.WriteFile(filePath, fromHostToContainer, 0644) + err := ioutil.WriteFile(srcPath, fromHostToContainer, 0644) + Expect(err).To(BeNil()) + err = os.Mkdir(dstDir, 0755) Expect(err).To(BeNil()) session := podmanTest.Podman([]string{"create", ALPINE, "ls", "foodir/"}) @@ -76,11 +73,11 @@ var _ = Describe("Podman cp", func() { Expect(session.ExitCode()).To(Equal(0)) name := session.OutputToString() - session = podmanTest.Podman([]string{"cp", filepath.Join(path, "cp_test.txt"), name + ":foodir/"}) + session = podmanTest.Podman([]string{"cp", srcPath, name + ":foodir/"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - session = podmanTest.Podman([]string{"cp", name + ":foodir/cp_test.txt", path + "/receive/"}) + session = podmanTest.Podman([]string{"cp", name + ":foodir/cp_test.txt", dstDir}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -89,10 +86,8 @@ var _ = Describe("Podman cp", func() { }) It("podman cp dir to dir", func() { - path, err := os.Getwd() - Expect(err).To(BeNil()) - testDirPath := filepath.Join(path, "TestDir") - err = os.Mkdir(testDirPath, 0777) + testDirPath := filepath.Join(podmanTest.RunRoot, "TestDir") + err := os.Mkdir(testDirPath, 0755) Expect(err).To(BeNil()) session := podmanTest.Podman([]string{"create", ALPINE, "ls", "/foodir"}) @@ -107,15 +102,11 @@ var _ = Describe("Podman cp", func() { session = podmanTest.Podman([]string{"cp", testDirPath, name + ":/foodir"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - - os.RemoveAll(testDirPath) }) It("podman cp stdin/stdout", func() { - path, err := os.Getwd() - Expect(err).To(BeNil()) - testDirPath := filepath.Join(path, "TestDir") - err = os.Mkdir(testDirPath, 0777) + testDirPath := filepath.Join(podmanTest.RunRoot, "TestDir") + err := os.Mkdir(testDirPath, 0755) Expect(err).To(BeNil()) cmd := exec.Command("tar", "-zcvf", "file.tar.gz", testDirPath) _, err = cmd.Output() @@ -139,8 +130,5 @@ var _ = Describe("Podman cp", func() { session = podmanTest.Podman([]string{"cp", name + ":/foo.tar.gz", "-"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - - os.Remove("file.tar.gz") - os.RemoveAll(testDirPath) }) }) |