Skip to content

Commit

Permalink
Merge pull request #496 from sameluch/Fix-Cache-Out-Of-Space-Test
Browse files Browse the repository at this point in the history
Fix small cache test by returning original cache path
  • Loading branch information
oliverkurth authored Oct 16, 2024
2 parents 39b43f0 + 31c0c33 commit 5747b3d
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 5747b3d

Please sign in to comment.