Techdebt: Update boto3_name to 'rds-data' (#7084)

This commit is contained in:
tungol 2023-12-01 15:26:18 -08:00 committed by GitHub
parent 10f82585e3
commit ba7953f1f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -184,7 +184,7 @@ mock_polly = lazy_load(".polly", "mock_polly")
mock_quicksight = lazy_load(".quicksight", "mock_quicksight") mock_quicksight = lazy_load(".quicksight", "mock_quicksight")
mock_ram = lazy_load(".ram", "mock_ram") mock_ram = lazy_load(".ram", "mock_ram")
mock_rds = lazy_load(".rds", "mock_rds") mock_rds = lazy_load(".rds", "mock_rds")
mock_rdsdata = lazy_load(".rdsdata", "mock_rdsdata") mock_rdsdata = lazy_load(".rdsdata", "mock_rdsdata", boto3_name="rds-data")
mock_redshift = lazy_load(".redshift", "mock_redshift") mock_redshift = lazy_load(".redshift", "mock_redshift")
mock_redshiftdata = lazy_load( mock_redshiftdata = lazy_load(
".redshiftdata", "mock_redshiftdata", boto3_name="redshift-data" ".redshiftdata", "mock_redshiftdata", boto3_name="redshift-data"

View File

@ -129,7 +129,7 @@ backend_url_patterns = [
("ram", re.compile("https?://ram\\.(.+)\\.amazonaws.com")), ("ram", re.compile("https?://ram\\.(.+)\\.amazonaws.com")),
("rds", re.compile("https?://rds\\.(.+)\\.amazonaws\\.com")), ("rds", re.compile("https?://rds\\.(.+)\\.amazonaws\\.com")),
("rds", re.compile("https?://rds\\.amazonaws\\.com")), ("rds", re.compile("https?://rds\\.amazonaws\\.com")),
("rdsdata", re.compile("https?://rds-data\\.(.+)\\.amazonaws\\.com")), ("rds-data", re.compile("https?://rds-data\\.(.+)\\.amazonaws\\.com")),
("redshift", re.compile("https?://redshift\\.(.+)\\.amazonaws\\.com")), ("redshift", re.compile("https?://redshift\\.(.+)\\.amazonaws\\.com")),
("redshift-data", re.compile("https?://redshift-data\\.(.+)\\.amazonaws\\.com")), ("redshift-data", re.compile("https?://redshift-data\\.(.+)\\.amazonaws\\.com")),
("rekognition", re.compile("https?://rekognition\\.(.+)\\.amazonaws\\.com")), ("rekognition", re.compile("https?://rekognition\\.(.+)\\.amazonaws\\.com")),

View File

@ -2,4 +2,4 @@
set -e set -e
pip install $(ls /moto/dist/moto*.gz)[server,all] pip install $(ls /moto/dist/moto*.gz)[server,all]
moto_server -H 0.0.0.0 > /moto/server_output.log 2>&1 moto_server -H 0.0.0.0 | tee /moto/server_output.log 2>&1

View File

@ -23,7 +23,9 @@ def test_execute_statement():
@mock_rdsdata @mock_rdsdata
def test_set_query_results(): def test_set_query_results():
base_url = ( base_url = (
"localhost:5000" if settings.TEST_SERVER_MODE else "motoapi.amazonaws.com" settings.test_server_mode_endpoint()
if settings.TEST_SERVER_MODE
else "http://motoapi.amazonaws.com"
) )
sql_result = { sql_result = {
@ -37,7 +39,7 @@ def test_set_query_results():
"region": "us-west-1", "region": "us-west-1",
} }
resp = requests.post( resp = requests.post(
f"http://{base_url}/moto-api/static/rds-data/statement-results", f"{base_url}/moto-api/static/rds-data/statement-results",
json=sql_result, json=sql_result,
) )
assert resp.status_code == 201 assert resp.status_code == 201