summaryrefslogtreecommitdiff
path: root/test/e2e
Commit message (Collapse)AuthorAge
* Use BeEmpty() instead of len(x).To(Equal(0))Ed Santiago2021-12-02
| | | | | | sed -i -e 's/Expect(len(\(.*\)))\.To(Equal(0))/Expect(\1).To(BeEmpty())/' test/e2e/*.go Signed-off-by: Ed Santiago <santiago@redhat.com>
* Same as previous, for assertions other than Equal()Ed Santiago2021-12-02
| | | | | | sed -i -e 's/Expect(\(.*\)\[\(\".*\"\)\])\.To(\(.*\)/Expect(\1).To(HaveKeyWithValue(\2, \3)/' test/e2e/*_test.go Signed-off-by: Ed Santiago <santiago@redhat.com>
* e2e tests: a little more minor cleanupEd Santiago2021-12-02
| | | | | | | | | | | | | | | sed -i -e 's/Expect(\(.*\)\[\(\".*\"\)\])\.To(Equal(/Expect(\1).To(HaveKeyWithValue(\2, /' test/e2e/*_test.go ...with two manual tweaks, because this converted: Expect(foo["bar"]).To(Equal("")) -> Expect(foo).To(HaveKeyWithValue("bar","")) It looks like the intention of the test was, instead: ...To(Not(HaveKey("bar"))) Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #12471 from edsantiago/e2e_tmpdir_cleanupOpenShift Merge Robot2021-12-02
|\ | | | | e2e tmpdir cleanup
| * remove ARTIFACT_DIR and ArtifactPathEd Santiago2021-12-01
| | | | | | | | | | | | ...they're not actually used for anything Signed-off-by: Ed Santiago <santiago@redhat.com>
| * Image caches: allow overriding cache dirEd Santiago2021-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Images were being cached in /tmp, with no option to override. Now $PODMAN_TEST_IMAGE_CACHE_DIR can be used to point to a user-preferred location. If unset, try $TMPDIR before settling on /tmp. Also: refactor the logic for determining the tarball name. Also: include registry name in tarball name. Also: clean up unused/unnecessary code Also: do not echo "Restoring..." if we're not actually restoring. Signed-off-by: Ed Santiago <santiago@redhat.com>
| * Rename CrioRoot as just RootEd Santiago2021-12-01
| | | | | | | | | | | | | | ...and remove other uses of "crio". They're confusing and misleading. (I'm sure it made sense at one time) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #12458 from edsantiago/remove_betrueOpenShift Merge Robot2021-12-01
|\ \ | | | | | | e2e: yet more cleanup of BeTrue/BeFalse
| * | e2e: yet more cleanup of BeTrue/BeFalseEd Santiago2021-11-30
| | | | | | | | | | | | | | | | | | Thanks to Paul for teaching me about HaveKey() Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #12450 from giuseppe/compression-formatOpenShift Merge Robot2021-12-01
|\ \ \ | |_|/ |/| | podman, push: expose --compression-format
| * | podman, push: expose --compression-formatGiuseppe Scrivano2021-12-01
| | | | | | | | | | | | | | | | | | support overriding the compression format at push time. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #12462 from vrothberg/fix-12452OpenShift Merge Robot2021-12-01
|\ \ \ | |_|/ |/| | top: parse ps(1) args correctly
| * | top: parse ps(1) args correctlyValentin Rothberg2021-12-01
| |/ | | | | | | | | | | | | The arguments of ps(1) should be shlexed. Fixes: #12452 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #12454 from edsantiago/remove_betrueOpenShift Merge Robot2021-11-30
|\ \ | | | | | | More BeTrue cleanup
| * | a few more manual BeTrue cleanupsEd Santiago2021-11-30
| | | | | | | | | | | | Signed-off-by: Ed Santiago <santiago@redhat.com>
| * | Convert strings.Contains() to Expect(ContainSubstring)Ed Santiago2021-11-30
| | | | | | | | | | | | | | | | | | | | | ...done manually, not via sed, because some of the inner expressions include nested commas. Signed-off-by: Ed Santiago <santiago@redhat.com>
| * | e2e tests: more cleanup of BeTrue()sEd Santiago2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write a BeValidJSON() matcher, and replace IsJSONOutputValid(): sed -i -e 's/Expect(\(.*\)\.IsJSONOutputValid()).To(BeTrue())/Expect(\1.OutputToString())\.To(BeValidJSON())/' test/e2e/*_test.go (Plus a few manual tweaks) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #12414 from flouthoc/api-allow-secretsOpenShift Merge Robot2021-11-30
|\ \ \ | |/ / |/| | tunnel: allow `remote` and `API` to accept `--secrets`
| * | podman-remote: prevent leaking secret into imageAditya Rajan2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | Prevents temp secrets leaking into image by moving it away from context directory to parent builder directory. Builder directory automatically gets cleaned up when we are done with the build. Signed-off-by: Aditya Rajan <arajan@redhat.com>
| * | podman-remote: copy secret to contextdir is absolute path on hostAditya Rajan2021-11-30
| |/ | | | | | | | | | | | | | | Podman remote must treat build secrets as part of context directory. If secret path is absolute path on host copy it to tar file and pass it to remote server. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* / systemd: replace multi-user with default.targetValentin Rothberg2021-11-30
|/ | | | | | | | | | Replace `multi-user.target` with `default.target` across the code base. It seems like the multi-user one is not available for (rootless) users on F35 anymore is causing issues in all kinds of ways, for instance, enabling the podman.service or generated systemd units. Fixes: #12438 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* e2e tests: enable golintEd Santiago2021-11-29
| | | | | | ...and fix problems found therewith. Signed-off-by: Ed Santiago <santiago@redhat.com>
* libpod: improve heuristic to detect cgroupGiuseppe Scrivano2021-11-24
| | | | | | | | | | | improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: https://github.com/containers/podman/issues/12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Find and fix empty Expect()sEd Santiago2021-11-23
| | | | | | | | | | | | That previous commit made me wonder if there are any other instances of Expect() with no assertions. grep Expect test/e2e/*_test.go |egrep -v '\.(To|NotTo|Should)' ...finds a couple of handfuls, most of which are OK (continued on the next line) but a few of which are bugs. Fix those. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Remove StringInSlice(), part 2Ed Santiago2021-11-23
| | | | | | | These were NOPs, and were testing the wrong thing (pod ID, not container ID). Fixed manually. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Remove StringInSlice(), part 1Ed Santiago2021-11-23
| | | | | | via: sed -i -e 's/Expect(StringInSlice(\(.*\), \(.*\))).To(BeTrue())/Expect(\2)\.To(ContainElement(\1))/' test/e2e/*_test.go Signed-off-by: Ed Santiago <santiago@redhat.com>
* e2e test cleanup, continuedEd Santiago2021-11-23
| | | | | | | | Continue eliminating GrepString() and BeTrue(), in tiny incremental steps. Here I take the liberty of refactoring some hard-to-read code by adding a helper. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #12371 from jakub-dzon/env-config-mapsOpenShift Merge Robot2021-11-23
|\ | | | | Support env variables based on ConfigMaps sent in payload
| * Support env variables based on ConfigMaps sent in payloadJakub Dzon2021-11-23
| | | | | | | | | | | | Fixes #12363 Signed-off-by: Jakub Dzon <jdzon@redhat.com>
* | Merge pull request #12361 from rhatdan/remoteDaniel J Walsh2021-11-23
|\ \ | | | | | | podman-remote does not support signature-policy
| * | podman-remote does not support signature-policyDaniel J Walsh2021-11-19
| | | | | | | | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/12357 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #12010 from vrothberg/fix-11964OpenShift Merge Robot2021-11-23
|\ \ \ | |_|/ |/| | image lookup: do not match *any* tags
| * | image lookup: do not match *any* tagsValentin Rothberg2021-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reasons buried in the history of Podman, looking up an untagged image would match any tag of matching image. For instance, looking up centos would match a local image centos:foobar. Change that behavior to only match the latest tag. Fix: #11964 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #12380 from vrothberg/fix-11618OpenShift Merge Robot2021-11-23
|\ \ \ | |/ / |/| | generate systemd: add --start-timeout flag
| * | generate systemd: add --start-timeout flagValentin Rothberg2021-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new flag to set the start timeout for a generated systemd unit. To make naming consistent, add a new --stop-timeout flag as well and let the previous --time map to it. Fixes: #11618 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Oops! Manual edits to broken testsEd Santiago2021-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 2 of 2: there were (still are?) a bunch of string checks that didn't have a corresponding Expect(). IIUC that means they were NOPs. Try to identify and fix those. The first few were caught by Go linting, "ok is defined but not used". When I realized the problem, I looked for more using: $ ack -A2 LineInOutputStartsWith ...and tediously eyeballing the results, looking for matches in which the next line was not Expect(). If test was wrong (e.g. "server" should've been "nameserver"), fix that. Also: remove the remove-betrue script. We don't need it in the repo, I just wanted to preserve it for posterity. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | e2e tests: clean up antihelpful BeTrue()sEd Santiago2021-11-22
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many ginkgo tests have been written to use this evil form: GrepString("foo") Expect(that to BeTrue()) ...which yields horrible useless messages on failure: false is not true Identify those (automatically, via script) and convert to: Expect(output to ContainSubstring("foo")) ...which yields: "this output" does not contain substring "foo" There are still many BeTrue()s left. This is just a start. This is commit 1 of 2. It includes the script I used, and all changes to *.go are those computed by the script. Commit 2 will apply some manual fixes. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #12386 from baude/playkuberenameDaniel J Walsh2021-11-22
|\ \ | | | | | | Rename pod on generate of container
| * | Rename pod on generate of containerBrent Baude2021-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | When generating kube of a container, the podname and container name in the yaml are identical. This offends rules in podman where pods and containers cannot have the same name. We now append _pod to the podname to avoid that collision. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #12349 from edsantiago/clean_fixmesOpenShift Merge Robot2021-11-22
|\ \ \ | |/ / |/| | Semiperiodic cleanup of obsolete Skip()s
| * | Semiperiodic cleanup of obsolete Skip()sEd Santiago2021-11-19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Found by my find-obsolete-skips script. Let's see which, if any, of these skipped tests can be reenabled. Some Skips are "this will never work", not "this is expected to work one day". Update the message on those to reflect that. Some were real bugs in the test framework. Fix those. And, joy of joys, some work today. Remove those skips. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #12351 from ↵OpenShift Merge Robot2021-11-22
|\ \ | | | | | | | | | | | | adrianreber/2021-11-18-restore-runtime-verification Restore runtime verification
| * | Add tests for restore runtime verificationAdrian Reber2021-11-19
| |/ | | | | | | | | | | | | | | On container restore ensures that the same container runtime is used as during checkpointing and it also ensures that the user does not select a different runtime. Signed-off-by: Adrian Reber <areber@redhat.com>
* / Add EXPOSE e2e testColin Bendell2021-11-20
|/ | | | Signed-off-by: Colin Bendell <colin@bendell.ca>
* test: Update error string for --file-locks testRadostin Stoyanov2021-11-19
| | | | | | | | Use a substring matching the end of the error message. Closes: #12366 Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
* Merge pull request #12295 from flouthoc/filter-label-patternOpenShift Merge Robot2021-11-18
|\ | | | | filters: add basic pattern matching for label keys i.e `--filter label=<pattern>`
| * filter: add basic pattern matching for label keysAditya Rajan2021-11-15
| | | | | | | | | | | | | | | | | | Following PR adds basic pattern matching to filter by labels for `keys`. Adds support for use-cases like `--filter label=some.prefix.com/key/*` where end-users want to match a pattern for keys as compared to exact value. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | Add test for checkpoint/restore with --file-locksRadostin Stoyanov2021-11-18
| | | | | | | | Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
* | remote checkpoint/restore: more fixesValentin Rothberg2021-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support `checkpoint --pre-checkpoint` * Support `checkpoint --with-previous` * Disable `restore --import-previous` for the remote client since we had to send two files which in turn would require to tar them up and hence be a breaking change. Podman 4.0 would be the chance and I hope we'll find time before that to remote-restore prettier. Note that I did not run over swagger yet to check whether all parameters are actually documented due to time constraints. Fixes: #12334 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | fix CIValentin Rothberg2021-11-18
| | | | | | | | | | | | | | | | | | | | | | | | Our fedora-minimal image on Quay bases on fedora-minimal:latest which starting with F35 removed a number of binaries that our CI depends on. Fix that by pulling `fedora-minimal:34` from the Fedora registry directly. Once the build bot on Quay has been disabled, we move the image over there to make sure that it will not change over time. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>