Commit Graph

15 Commits

Author SHA1 Message Date
Debarshi Ray
912e112bb1 Update Bats
Ever since Toolbx 0.0.99.4, at least Bats 1.5.0 has been required [1],
with even newer Bats versions containing important bug fixes.

Fallout from 6d8f4e2a69

[1] Upstream commit 978bb524e45549b3
    https://github.com/containers/toolbox/commit/978bb524e45549b3
    https://github.com/containers/toolbox/pull/1081

Resolves: RHEL-61578
2024-10-07 00:25:49 +02:00
Debarshi Ray
92cec9df63 tests: Avoid running out of storage space
Toolbx's system tests download several images when setting up the test
suite, and cache them for later use by the tests [1].  This saves time
and avoids hitting rate limits imposed by OCI registries by not
downloading the same images repeatedly for several tests, but at the
cost of increased use of storage space to cache the images.

The images are cached under BATS_TMPDIR.  It defaults to the TMPDIR
environment variable, and if that's not set then to /tmp [2].  Normally,
TMPDIR isn't set, and the images end up getting cached under /tmp.  Now,
/tmp is typically on tmpfs backed by RAM or swap, which means that it
should be used for smaller size-bounded files only, and /var/tmp should
be used for everything else [3].

The images are big enough that a collection of them can't be described
as smaller and size-bounded, and it led to:
  1..306
  # test suite: Set up
  # test suite: Tear down
  not ok 1 setup_suite
  # (from function `setup_suite' in test file ./setup_suite.bash, line
      55)
  #   `_pull_and_cache_distro_image fedora "$((system_version-1))" ||
      false' failed
  # Failed to cache image registry.fedoraproject.org/fedora-toolbox:40
      to /tmp/bats-run-IPz4Cn/image-cache/fedora-toolbox-40
  # time="2024-02-19T11:41:43Z" level=fatal msg="copying system image
      from manifest list: writing blob: write
      /tmp/bats-run-IPz4Cn/image-cache/fedora-toolbox-40/dir-put-blob607392514:
      no space left on device"
  # bats warning: Executed 1 instead of expected 306 tests

So, change the default location of the BATS_TMPDIR environment variable
to /var/tmp by setting TMPDIR.

[1] Toolbx commit 50683c9d9a78adc9
    https://github.com/containers/toolbox/commit/50683c9d9a78adc9
    https://github.com/containers/toolbox/pull/375

[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html

[3] https://systemd.io/TEMPORARY_DIRECTORIES/

Resolves: RHEL-61578
2024-10-07 00:25:49 +02:00
Debarshi Ray
da83eb99bb tests: Remove redundant environment variable
There's no need to explicitly set the PODMAN environment variable to its
default value of /usr/bin/podman.

Resolves: RHEL-19772
2024-01-15 12:09:09 +01:00
Debarshi Ray
06c284b9ce tests: Fix the tag of the default image
The test suite should use the latest build of the image for any given
RHEL minor release. Otherwise, it won't detect any breakage caused by
changes to the image.

Resolves: #2000807
2021-12-16 23:46:53 +01:00
Debarshi Ray
7212974445 tests: Add missing newline at end of file
Otherwise, it's difficult to read the file with cat(1).

Resolves: #2000807
2021-12-16 23:30:02 +01:00
Debarshi Ray
cd00cb09ca tests: Fix the permissions of /etc/containers/toolbox.conf
The RPM installs /etc/containers/toolbox.conf with its permissions set
to 0644, and there's no reason for the test suite to deviate from that.

Resolves: #2000807
2021-12-16 23:26:20 +01:00
Oliver Gutierrez
b43ce464c3
Changed image for tests and tests parameters
Related: #2000051
2021-09-16 15:35:17 +01:00
Oliver Gutierrez
573971252e
Changed default image for tests
Related: #2000051
2021-09-16 11:45:05 +01:00
Oliver Gutierrez
d037151cc0
Added ability to force test system id and version id
Related: #2000051
2021-09-14 13:47:38 +01:00
Oliver Gutierrez
d5f960300f
Fixed test roles and changed default image path
Related: #2000051
2021-09-14 11:20:59 +01:00
Oliver Gutierrez
8eac0d08fd
Added new role to setup default container image
Related: rhbz#2000051
2021-09-14 10:19:51 +01:00
Jindrich Novy
768bb82508 toolbox-0.0.99.3-0.6.git660b6970e998.el9
- re-add gating tests
- Related: #2000051

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
2021-09-03 16:06:00 +02:00
Jindrich Novy
b9680ab712 toolbox-0.0.99.3-0.5.git660b6970e998.el9
- Make sosreport work by setting the HOST environment variable
- Related: #2000051

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
2021-09-03 11:31:08 +02:00
Oliver Gutierrez
b0004b6b93
Updated bats version for gating tests
Related: rhbz#1977343
2021-08-30 15:20:24 +01:00
Oliver Gutierrez
66677d233d
Added gating based on podman gating
Resolves: rhbz#1977343
2021-08-24 11:14:29 +01:00