summaryrefslogtreecommitdiff
path: root/test/endpoint
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-07-29 14:39:02 -0400
committerMatthew Heon <mheon@redhat.com>2020-10-20 09:20:33 -0400
commit3858fc1d019d13fe3378c129d133fd22789ac0dc (patch)
treeb4352cd8f7ee06586fcdfedd0e78a292ed644b54 /test/endpoint
parent338d521782727daca90efc2601b16502626aa53c (diff)
downloadpodman-3858fc1d019d13fe3378c129d133fd22789ac0dc.tar.gz
podman-3858fc1d019d13fe3378c129d133fd22789ac0dc.tar.bz2
podman-3858fc1d019d13fe3378c129d133fd22789ac0dc.zip
Use runtime names instead of paths in E2E tests
My patches to fix `--runtime /usr/bin/crun` being allowed to use a different version of the crun runtime revealed a problem: we were actually relying on that exact behavior in our E2E tests. We specified the runtime path as `/usr/bin/runc` for the Ubuntu tests, but that didn't exist, so Podman was actively looking for a different, usable runc binary and using that, instead of the path we explicitly hardcoded. Fixing the bug broke this, and thus broke the tests. Instead of hard-coding OCI runtime paths, swap to just using the runtime name, `runc` or `crun`, and letting Podman figure out where the runtime lives - it's quite good at that. This should un-break the tests and make them more durable. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/endpoint')
-rw-r--r--test/endpoint/setup.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/test/endpoint/setup.go b/test/endpoint/setup.go
index 56cab06b0..6bbc8d2bc 100644
--- a/test/endpoint/setup.go
+++ b/test/endpoint/setup.go
@@ -51,14 +51,7 @@ func Setup(tempDir string) *EndpointTestIntegration {
ociRuntime := os.Getenv("OCI_RUNTIME")
if ociRuntime == "" {
- var err error
- ociRuntime, err = exec.LookPath("runc")
- // If we cannot find the runc binary, setting to something static as we have no way
- // to return an error. The tests will fail and point out that the runc binary could
- // not be found nicely.
- if err != nil {
- ociRuntime = "/usr/bin/runc"
- }
+ ociRuntime = "runc"
}
os.Setenv("DISABLE_HC_SYSTEMD", "true")
CNIConfigDir := "/etc/cni/net.d"