Skip to content

Commit 169b593

Browse files
stephencpopeDescartes Labs Build
authored andcommitted
Config: Eliminate aws-testing (#12508)
GitOrigin-RevId: 2f4fbc40519b9e0b7b6410207c96c6ea941e1a84
1 parent 891f410 commit 169b593

File tree

3 files changed

+13
-39
lines changed

3 files changed

+13
-39
lines changed

descarteslabs/config/settings.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ usage_url = "@format {this.PLATFORM_URL}/usage/v1"
6767
vector_url = "@format {this.PLATFORM_URL}/vector/v1"
6868
yaas_url = "@format {this.PLATFORM_URL}/yaas/v1"
6969

70-
[aws-testing]
71-
# testing is now for aws but keep this until it is removed everywhere
72-
default_domain = "@format dev.aws.{this.DOMAIN}"
73-
platform_url = "@format https://platform.{this.DEFAULT_DOMAIN}"
70+
[local]
71+
# feel free to mess with anything here as needed
72+
default_domain = "dev.localhost"
73+
platform_url = "@format https://platform.dev.aws.descarteslabs.com"
7474
testing = true
7575

7676
catalog_v2_url = "@format {this.PLATFORM_URL}/metadata/v1/catalog/v2"
7777
compute_url = "@format {this.PLATFORM_URL}/compute/v1"
78-
iam_url = "@format https://iam.{this.DEFAULT_DOMAIN}"
78+
iam_url = "@format https://{this.DEFAULT_DOMAIN}:8000"
7979
metadata_url = "@format {this.PLATFORM_URL}/metadata/v1"
8080
raster_url = "@format {this.PLATFORM_URL}/raster/v2"
8181
usage_url = "@format {this.PLATFORM_URL}/usage/v1"
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
["testing"]
22
testing = "hello"
3-
iam_url = "https://aws_url"
4-
5-
["aws-testing"]
6-
testing = "hello"
7-
iam_url = "https://aws_url"
8-
9-
["gcp-testing"]
10-
testing = "hello"
11-
iam_url = "https://gcp_url"
3+
iam_url = "https://test_url"

descarteslabs/config/tests/test_config.py

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_get_settings(self):
8888

8989
def test_peek_settings(self):
9090
current_env = os.environ["DESCARTESLABS_ENV"]
91-
env = "aws-testing"
91+
env = "aws-production"
9292
settings = Settings.peek_settings(env)
9393
assert os.environ["DESCARTESLABS_ENV"] == current_env
9494
assert settings.env == env
@@ -105,22 +105,17 @@ def test_bad_env(self):
105105

106106
def test_default_auth(self):
107107
a = Auth()
108-
a.domain == "http://gcp_url"
108+
assert a.domain == "https://iam.dev.aws.descarteslabs.com"
109109

110110
def test_auth_with_env(self):
111-
with patch.dict(os.environ, {"DESCARTESLABS_ENV": "aws-testing"}):
111+
with patch.dict(os.environ, {"DESCARTESLABS_ENV": "aws-production"}):
112112
a = Auth()
113-
a.domain == "http://aws_url"
113+
assert a.domain == "https://iam.production.aws.descarteslabs.com"
114114

115-
def test_auth_with_aws_config(self):
116-
Settings.select_env("aws-testing")
115+
def test_auth_with_test_config(self):
116+
Settings.select_env("aws-production")
117117
a = Auth()
118-
a.domain == "http://aws_url"
119-
120-
def test_auth_with_gcp_config(self):
121-
Settings.select_env("testing")
122-
a = Auth()
123-
a.domain == "http://gcp_url"
118+
assert a.domain == "https://iam.production.aws.descarteslabs.com"
124119

125120
def test_env(self):
126121
peek1_env = "aws-dev"
@@ -175,19 +170,6 @@ class VerifyValues(unittest.TestCase):
175170
"VECTOR_URL": "https://platform.staging.aws.descarteslabs.com/vector/v1",
176171
"YAAS_URL": "https://platform.staging.aws.descarteslabs.com/yaas/v1",
177172
},
178-
"aws-testing": {
179-
"CATALOG_V2_URL": "https://platform.dev.aws.descarteslabs.com/metadata/v1/catalog/v2",
180-
"COMPUTE_URL": "https://platform.dev.aws.descarteslabs.com/compute/v1",
181-
"IAM_URL": "https://iam.dev.aws.descarteslabs.com",
182-
"LOG_LEVEL": "WARNING",
183-
"METADATA_URL": "https://platform.dev.aws.descarteslabs.com/metadata/v1",
184-
"PLATFORM_URL": "https://platform.dev.aws.descarteslabs.com",
185-
"RASTER_URL": "https://platform.dev.aws.descarteslabs.com/raster/v2",
186-
"TESTING": True,
187-
"USAGE_URL": "https://platform.dev.aws.descarteslabs.com/usage/v1",
188-
"VECTOR_URL": "https://platform.dev.aws.descarteslabs.com/vector/v1",
189-
"YAAS_URL": "https://platform.dev.aws.descarteslabs.com/yaas/v1",
190-
},
191173
"testing": {
192174
"CATALOG_V2_URL": "https://platform.dev.aws.descarteslabs.com/metadata/v1/catalog/v2",
193175
"COMPUTE_URL": "https://platform.dev.aws.descarteslabs.com/compute/v1",

0 commit comments

Comments
 (0)