Skip to content

Commit a5a0d53

Browse files
committed
test/system: Remove redundant clean-up
The IMAGE_CACHE_DIR environment variable is defined as "${BATS_SUITE_TMPDIR}/image-cache" [1]. Earlier, it used to be "${BATS_RUN_TMPDIR}/image-cache". There's no need to clean up anything inside BATS_RUN_TMPDIR or BATS_SUITE_TMPDIR after the test suite has finished running, because their life cycle is managed by Bats [2]. [1] Commit 3a549a6 3a549a6252e990d6 #1452 [2] https://bats-core.readthedocs.io/en/stable/writing-tests.html Fallout from 9820550 #1645
1 parent d64682a commit a5a0d53

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

test/system/libs/helpers.bash

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ function _pull_and_cache_distro_image() {
120120
}
121121

122122

123-
# Removes the folder with cached images
124-
function _clean_cached_images() {
125-
rm --force --recursive "${IMAGE_CACHE_DIR}"
126-
}
127-
128-
129123
# Prepares a locally hosted image registry
130124
#
131125
# The registry is set up with Podman set to an alternative root. It won't

test/system/setup_suite.bash

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# shellcheck shell=bash
22
#
3-
# Copyright © 2021 – 2024 Red Hat, Inc.
3+
# Copyright © 2021 – 2025 Red Hat, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -85,6 +85,5 @@ teardown_suite() {
8585
_clean_docker_registry
8686
fi
8787

88-
_clean_cached_images
8988
podman system reset --force >/dev/null
9089
}

0 commit comments

Comments
 (0)