e2e tests: use /var/tmp, not $TMPDIR, as workdirs

TMPDIR is typically /tmp which is typically(*) a tmpfs.

This PR ignores $TMPDIR when $CI is defined, forcing all
e2e tests to set up one central working directory in /var/tmp
instead.

Also, lots of cleanup.

 (*) For many years, up to and still including the time of
     this PR, /tmp on Fedora CI VMs is actually NOT tmpfs,
     it is just / (root). This is nonstandard and undesirable.
     Efforts are underway to remove this special case.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2024-03-28 06:46:05 -06:00
parent e5cfbbb09e
commit eaf60c7fe7
17 changed files with 62 additions and 76 deletions

View File

@ -27,12 +27,6 @@ var _ = Describe("Common functions test", func() {
ProcessOneCgroupPath = defaultCgroupPath
})
It("Test CreateTempDirInTempDir", func() {
tmpDir, _ := CreateTempDirInTempDir()
_, err := os.Stat(tmpDir)
Expect(os.IsNotExist(err)).ShouldNot(BeTrue(), "Directory is not created as expect")
})
It("Test SystemExec", func() {
session := SystemExec(GoechoPath, []string{})
Expect(session.Command.Process).ShouldNot(BeNil(), "SystemExec cannot start a process")