Skip to content

Commit

Permalink
Merge pull request #279 from ligangty/main
Browse files Browse the repository at this point in the history
Enable test_check_invalidation for CloudFront test
  • Loading branch information
ligangty authored Sep 30, 2024
2 parents 84e9cc4 + ea7d920 commit d6021e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ pytest-cov
pytest-html
flake8
requests-mock
moto>=5.0.3,<6
moto>=5.0.16,<6
python-gnupg>=0.5.0,<1
4 changes: 4 additions & 0 deletions tests/test_cf_reindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@

@mock_aws
class CFReIndexTest(CFBasedTest):
'''
This test is deprecated because the cf invalidation after re_index
is not used anymore.
'''
@pytest.mark.skip(reason="Indexing CF invalidation is abandoned")
def test_cf_maven_after_reindex(self):
response = self.mock_cf.list_invalidations(DistributionId=self.test_dist_id)
Expand Down
5 changes: 0 additions & 5 deletions tests/test_cfclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from charon.cache import CFClient
from moto import mock_aws
import boto3
import pytest


@mock_aws
Expand Down Expand Up @@ -62,10 +61,6 @@ def test_invalidate_paths_multi(self):
self.assertTrue(r['Id'])
self.assertEqual('completed', str.lower(r['Status']))

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

0 comments on commit d6021e2

Please sign in to comment.