test/e2e: fix "with unsafe hostPath subpaths" test

A recent pasta update changed the selinux rules and we now run pasta
under pasta_t and no longer the container_runtime_t type. The pasta type
has much stricter type rules on what the file we hand it must be
labelled. This test tries to mount the runroot which gets relabeled with
the container_file_t type but that means pasta can no longer access its
pid file we give it. To fix this test here simply mount a subdir.

see #26473

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2025-06-23 11:42:11 +02:00
parent 7808625785
commit 01fb3aaae4
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 1 additions and 1 deletions

View File

@ -5549,7 +5549,7 @@ spec:
}) })
It("with unsafe hostPath subpaths", func() { It("with unsafe hostPath subpaths", func() {
hostPathLocation := podmanTest.TempDir hostPathLocation := filepath.Join(podmanTest.TempDir, "vol")
Expect(os.MkdirAll(filepath.Join(hostPathLocation, "testing"), 0755)).To(Succeed()) Expect(os.MkdirAll(filepath.Join(hostPathLocation, "testing"), 0755)).To(Succeed())
Expect(os.Symlink("/", filepath.Join(hostPathLocation, "testing", "symlink"))).To(Succeed()) Expect(os.Symlink("/", filepath.Join(hostPathLocation, "testing", "symlink"))).To(Succeed())