Skip to content

Commit

Permalink
Explicitly list files_to_sync (#285)
Browse files Browse the repository at this point in the history
Explicitly list files_to_sync

synced_files has been removed.
If you want to sync any file downstream you need to add it to the list.

Reviewed-by: Nikola Forró
Reviewed-by: Maja Massarini
Reviewed-by: Matej Focko
  • Loading branch information
softwarefactory-project-zuul[bot] authored Sep 23, 2024
2 parents 085957a + e9de714 commit 2634a86
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ actions:
get-current-version:
- hatch version

files_to_sync:
- fedora/python-requre.spec
- .packit.yaml

srpm_build_deps:
- python3-build
- hatch
Expand Down
2 changes: 1 addition & 1 deletion tests/test_e2e_test_patching.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


CMD_RELATIVE = f"""python3 {os.path.join(os.path.dirname(os.path.dirname(__file__)),
"requre", "requre_patch.py")}"""
"requre", "requre_patch.py")}"""
CMD_TOOL = "requre-patch"

DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
Expand Down
12 changes: 9 additions & 3 deletions tests/test_request_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ def testRawCall(self):
"""
Test if is class is able to explicitly write and read request handling
"""
keys = [self.domain]
# example.com domain is not acceptig POST requests anymore
# using stg.packit.dev instead
keys = [
"https://stg.packit.dev/api/webhooks/github",
]
sess = RequestResponseHandling(store_keys=keys)
response = self.requests.post(*keys)
sess.write(response)

response_after = sess.read()
self.assertIsInstance(response_after, self.requests.models.Response)
self.assertNotIn("Example Domain", str(sess.get_cassette().storage_object))
self.assertIn("Example Domain", response_after.text)
self.assertNotIn(
"We haven't received any JSON data", str(sess.get_cassette().storage_object)
)
self.assertIn("We haven't received any JSON data", response_after.text)

@unittest.skipIf(not network_connection_available(), "No network connection")
def testExecuteWrapper(self):
Expand Down

0 comments on commit 2634a86

Please sign in to comment.