Skip to content

Commit 43ff58a

Browse files
committed
Enable test_check_invalidation for CloudFront test
As moto 5.0.16 added support fot get_invalidation Signed-off-by: Gang Li <ligangty@users.noreply.github.com>
1 parent 67e8382 commit 43ff58a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ pytest-cov
55
pytest-html
66
flake8
77
requests-mock
8-
moto>=5.0.3,<6
8+
moto>=5.0.16,<6
99
python-gnupg>=0.5.0,<1

tests/test_cf_reindex.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727

2828
@mock_aws
2929
class CFReIndexTest(CFBasedTest):
30+
'''
31+
This test is deprecated because the cf invalidation after re_index
32+
is not used anymore.
33+
'''
3034
@pytest.mark.skip(reason="Indexing CF invalidation is abandoned")
3135
def test_cf_maven_after_reindex(self):
3236
response = self.mock_cf.list_invalidations(DistributionId=self.test_dist_id)

tests/test_cfclient.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from charon.cache import CFClient
1919
from moto import mock_aws
2020
import boto3
21-
import pytest
2221

2322

2423
@mock_aws
@@ -62,10 +61,6 @@ def test_invalidate_paths_multi(self):
6261
self.assertTrue(r['Id'])
6362
self.assertEqual('completed', str.lower(r['Status']))
6463

65-
@pytest.mark.skip(reason="""
66-
Because current moto 5.0.3 has not implemented the get_invalidation(),
67-
this test will fail. Will enable it when the it is implemented in future moto
68-
""")
6964
def test_check_invalidation(self):
7065
dist_id = self.cf_client.get_dist_id_by_domain("maven.repository.redhat.com")
7166
result = self.cf_client.invalidate_paths(dist_id, ["/*"])

0 commit comments

Comments
 (0)