Commit graph

26 commits

Author SHA1 Message Date
Valentin Rothberg 5dded6fae7 bump go module to v3
We missed bumping the go module, so let's do it now :)

* Automated go code with github.com/sirkon/go-imports-rename
* Manually via `vgrep podman/v2` the rest

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-22 09:03:51 +01:00
OpenShift Merge Robot 8e4d19da15
Merge pull request #8863 from mgoltzsche/fix_seccomp_when_privileged
Disable seccomp by default when creating a privileged container.
2021-01-04 14:49:41 +01:00
Max Goltzsche bd35792b0c
fix: disable seccomp by default when privileged.
When running a privileged container and `SeccompProfilePath` is empty no seccomp profile should be applied.
(Previously this was the case only if `SeccompProfilePath` was set to a non-empty default path.)

Closes #8849

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
2021-01-02 01:38:19 +01:00
Giuseppe Scrivano b3bd37b537
test: fix variables name
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-24 22:12:04 +01:00
Daniel J Walsh 1ace9e3ba6
Properly handle --cap-add all when running with a --user flag
Handle the ALL Flag when running with an account as a user.

Currently we throw an error when the user specifies

podman run --user bin --cap-add all fedora echo hello

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 14:21:16 -05:00
Daniel J Walsh b496802413
Make all Skips specify a reason
Always use CGROUPV2 rather then reading from system all the time.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 16:01:26 -04:00
Daniel J Walsh 007c0ecd50
Remove SkipIfRootless if possible, document other calls
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-27 07:55:16 -04:00
Ed Santiago 36caf4ee44 WIP: update VM images
(This is an adoption of #7533 because Brent is on PTO).

Pick up new crun and crio-runc.

Also: renames from useful fedora-32 and -31 to less-useful
names; presumably this is needed by something-something in
the new VM setup.

Also: tweak two e2e tests to more properly handle a kernel
(5.8.4) with a greater set of capabilities than what we
or crun can yet handle.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-03 14:08:34 -06:00
Daniel J Walsh a5e37ad280
Switch all references to github.com/containers/libpod -> podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 08:23:45 -04:00
Daniel J Walsh 65e1638f9b
Enable a bunch of remote tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-21 19:23:24 -04:00
Daniel J Walsh a10d5b42ab
Change buildtag for remoteclient to remote for testing
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-06 15:22:24 -04:00
Valentin Rothberg 8489dc4345 move go module to v2
With the advent of Podman 2.0.0 we crossed the magical barrier of go
modules.  While we were able to continue importing all packages inside
of the project, the project could not be vendored anymore from the
outside.

Move the go module to new major version and change all imports to
`github.com/containers/libpod/v2`.  The renaming of the imports
was done via `gomove` [1].

[1] https://github.com/KSubedi/gomove

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-06 15:50:12 +02:00
baude f610a485c1 use imagecaches for local tests
when doing localized tests (not varlink), we can use secondary image
stores as read-only image caches.  this cuts down on test time
significantly because each test does not need to restore the images from
a tarball anymore.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-29 15:12:05 -05:00
baude c6b205be77
Enable rootless integration tests
Signed-off-by: baude <bbaude@redhat.com>
2019-03-19 15:01:48 +01:00
baude d5546008ab ginkgo status improvements
a series of improvements to our ginkgo test framework so we can
get better ideas of whats going on when run in CI

Signed-off-by: baude <bbaude@redhat.com>
2019-03-08 13:28:33 -06:00
Chris Evich f67859ffb3
Fix SystemExec completion race
Some callers assume when SystemExec returns, the command has completed.
Other callers explicitly wait for completion (as required).  However,
forgetting to do that is an incredibly easy mistake to make.  Fix this
by adding an explicit parameter to the function.  This requires
every caller to deliberately state whether or not a completion-check
is required.

Also address **many** resource naming / cleanup completion-races.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-01 09:18:45 -05:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
Yiqiao Pu aaa31bbb1a Fix no-new-privileges test
Update the test to compare the output from different containers.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:24 +08:00
Yiqiao Pu 74bcfc2f96 Separate common used test functions and structs to test/utils
Put common used test functions and structs to a separated package.
So we can use them for more testsuites.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:00 +08:00
baude ee8f19e7be Make podman ps fast
Like Ricky Bobby, we want to go fast.

Signed-off-by: baude <bbaude@redhat.com>
2018-10-23 08:26:21 -05:00
baude 433cbd5254 Show duration for each ginkgo test and test speed improvements
Because our tests are getting so long, we want to be able to audit which tests are taking
the longest to complete.  This may indicate a bad test, bad CI, bad code, etc and therefore
should be auditable.

Also, make speed improvements to tests by making sure we only unpack caches images that
actually get used.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1178
Approved by: mheon
2018-07-28 22:51:08 +00:00
baude 35a10c9ba5 Only allocate tty when -t
In our ezrly development, we always allocated a tty when not -d.  Now we should only allocated when the user asks for it.

Resolves: #573

Signed-off-by: baude <bbaude@redhat.com>

Closes: #574
Approved by: rhatdan
2018-04-03 22:23:23 +00:00
baude 5e7979f016 Address review comments
Review comments to delete WithNoNew function and its append.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #369
Approved by: rhatdan
2018-02-24 09:15:47 +00:00
Daniel J Walsh 831dc48883 Add support for --no-new-privs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #369
Approved by: rhatdan
2018-02-24 09:15:47 +00:00
baude 586bb86a2a Run podman inside a podman container
We should be able to run nested podman containers in particular
for our testing environment. i.e. eat our own dog food.

Some privileges had to be corrected in order for this to work
correctly.

Added a third papr target that runs podman tests inside podman.  I
marked the test as not required right now as we get more confident
in the results

Signed-off-by: baude <bbaude@redhat.com>

Closes: #340
Approved by: rhatdan
2018-02-16 18:35:54 +00:00
baude be9ed1cfac Privileged containers should inherit host devices
When running a privileged container, it should inherit the same
devices the host has.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #330
Approved by: mheon
2018-02-15 00:20:47 +00:00
Renamed from test/e2e/privileged_test.go (Browse further)