Skip to content

Commit

Permalink
Try to fix endpoint url in integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
ceholden committed Nov 19, 2024
1 parent 791a3d3 commit 11de9cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions integration_tests/test_link_push_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_link_push_subscription_handles_event(
"""
for _ in range(notification_count):
resp = requests.post(
f"{link_subscription_endpoint_url}/events",
f"{link_subscription_endpoint_url}events",
auth=link_subscription_credentials,
json=recent_event_s2_created,
)
Expand All @@ -126,8 +126,10 @@ def test_link_push_subscription_user_auth_rejects_incorrect(
link_subscription_endpoint_url: str,
):
"""Test that we reject incorrect authentication"""
url = f"{link_subscription_endpoint_url}events"
print(f"Sending POST request to {url=}")
resp = requests.post(
f"{link_subscription_endpoint_url}events",
url,
auth=(
"foo",
"bar",
Expand Down
1 change: 1 addition & 0 deletions lambdas/link_fetcher/app/subscription_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def get_endpoint_url(
) -> str:
"""Return the endpoint URL stored in SSM parameter store"""
param_name = param_name_template.format(stage=self.stage)
print(f"Reading endpoint url from {param_name}")
result = ssm_client.get_parameter(Name=param_name)
if (value := result["Parameter"].get("Value")) is None:
raise ValueError(f"No such SSM parameter {param_name}")
Expand Down

0 comments on commit 11de9cf

Please sign in to comment.