From 3d850de60ee5ba989e7b64466bcc78f9f676a2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Tue, 23 Jul 2019 10:57:17 +0200 Subject: tests/artifactcache/expiry.py: Fix test_cleanup_first Remove check for order of events as cache cleanup is now handled by buildbox-casd, not BuildStream scheduler jobs. The test still verifies that build succeeds when the cache disk usage is larger than the configured quota. --- tests/artifactcache/expiry.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py index 37a84053b..e0bbb4007 100644 --- a/tests/artifactcache/expiry.py +++ b/tests/artifactcache/expiry.py @@ -21,7 +21,6 @@ # pylint: disable=redefined-outer-name import os -import re from unittest import mock import pytest @@ -391,7 +390,6 @@ def test_invalid_cache_quota(cli, datafiles, quota, err_domain, err_reason): # the cache size and cleanup jobs are run before any other jobs. # @pytest.mark.datafiles(DATA_DIR) -@pytest.mark.xfail() def test_cleanup_first(cli, datafiles): project = str(datafiles) element_path = 'elements' @@ -431,18 +429,6 @@ def test_cleanup_first(cli, datafiles): res = cli.run(project=project, args=['build', 'target2.bst']) res.assert_success() - # Find all of the activity (like push, pull, src-pull) lines - results = re.findall(r'\[.*\]\[.*\]\[\s*(\S+):.*\]\s*START\s*.*\.log', res.stderr) - - # Don't bother checking the order of 'src-pull', it is allowed to start - # before or after the initial cache size job, runs in parallel, and does - # not require ResourceType.CACHE. - results.remove('fetch') - print(results) - - # Assert the expected sequence of events - assert results == ['size', 'clean', 'build'] - # Check that the correct element remains in the cache states = cli.get_element_states(project, ['target.bst', 'target2.bst']) assert states['target.bst'] != 'cached' -- cgit v1.2.1