Skip to content

Commit 8e0e63f

Browse files
committed
fix recent config change
1 parent 43452a3 commit 8e0e63f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

aws-replicator/aws_replicator/client/auth_proxy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def register_in_instance(self):
145145
if not port:
146146
raise Exception("Proxy currently not running")
147147
url = f"{external_service_url()}{HANDLER_PATH_PROXIES}"
148-
data = AddProxyRequest(port=port, config=self.config)
148+
data = AddProxyRequest(port=port, config=self.config, env_vars={})
149149
LOG.debug("Registering new proxy in main container via: %s", url)
150150
try:
151151
response = requests.post(url, json=data)

aws-replicator/aws_replicator/server/aws_request_forwarder.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@
66
import requests
77
from localstack.aws.api import RequestContext
88
from localstack.aws.chain import Handler, HandlerChain
9-
from localstack.constants import (
10-
APPLICATION_JSON,
11-
LOCALHOST,
12-
LOCALHOST_HOSTNAME,
13-
TEST_AWS_ACCESS_KEY_ID,
14-
)
9+
from localstack.constants import APPLICATION_JSON, LOCALHOST, LOCALHOST_HOSTNAME
1510
from localstack.http import Response
11+
from localstack.testing.config import TEST_AWS_ACCESS_KEY_ID
1612
from localstack.utils.aws import arns
1713
from localstack.utils.aws.arns import sqs_queue_arn
1814
from localstack.utils.aws.aws_stack import get_valid_regions
@@ -192,6 +188,7 @@ def _extract_region_from_domain(self, context: RequestContext):
192188
context.request.headers["Authorization"] = mock_aws_request_headers(
193189
context.service.service_name,
194190
region_name=part,
191+
# FIXME: TEST_AWS_ACCESS_KEY_ID should only be used in testing
195192
aws_access_key_id=TEST_AWS_ACCESS_KEY_ID,
196193
)
197194
return

aws-replicator/tests/test_proxy_requests.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def start_aws_proxy():
2323

2424
def _start(config: dict = None):
2525
proxy = start_aws_auth_proxy(config)
26-
proxy.wait_is_up()
26+
if not proxy.wait_is_up(timeout=10):
27+
raise TimeoutError(f"Gave up waiting for proxy to start on {proxy.url}")
2728
proxies.append(proxy)
2829
return proxy
2930

0 commit comments

Comments
 (0)