Skip to content

Commit

Permalink
Fix small cache test by returning original cache path
Browse files Browse the repository at this point in the history
  • Loading branch information
sameluch committed Sep 20, 2024
1 parent 066bd38 commit 4976bb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytests/tests/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def test_download_vs_cache_size_multiple_packages(utils):
@pytest.mark.skipif(try_mount_small_cache() != 0, reason="Failed to mount small cache directory.")
def test_cache_directory_out_of_disk_space(utils):
small_cache_path = utils.config['small_cache_path']
orig_cache_path = utils.tdnf_config.get('main', 'cachedir')
switch_cache_path(utils, small_cache_path)
enable_cache(utils)
clean_small_cache(utils)
Expand All @@ -232,7 +233,7 @@ def test_cache_directory_out_of_disk_space(utils):
run_args.append(pkgname)
ret = utils.run(run_args)

switch_cache_path(utils, utils.tdnf_config.get('main', 'cachedir'))
switch_cache_path(utils, orig_cache_path)
clean_cache(utils)
clean_small_cache(utils)
assert ret['retval'] == 1036
Expand Down

0 comments on commit 4976bb1

Please sign in to comment.