Skip to content

Commit

Permalink
address codeQL warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ykim-akamai committed Jan 27, 2025
1 parent 8eaa296 commit 8be1d5f
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions test/unit/objects/database_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,16 @@ def test_create(self):
with self.mock_post("/databases/mysql/instances") as m:
# We don't care about errors here; we just want to
# validate the request.
self.client.database.mysql_create(
"cool",
"us-southeast",
"mysql/8.0.26",
"g6-standard-1",
cluster_size=3,
)
try:
self.client.database.mysql_create(
"cool",
"us-southeast",
"mysql/8.0.26",
"g6-standard-1",
cluster_size=3,
)
except Exception as e:
logger.warning("An error occurred while validating the request: %s", e)

self.assertEqual(m.method, "post")
self.assertEqual(m.call_url, "/databases/mysql/instances")
Expand Down Expand Up @@ -292,13 +295,16 @@ def test_create(self):
with self.mock_post("/databases/postgresql/instances") as m:
# We don't care about errors here; we just want to
# validate the request.
self.client.database.mysql_create(
"cool",
"us-southeast",
"mysql/8.0.26",
"g6-standard-1",
cluster_size=3,
)
try:
self.client.database.postgresql_create(
"cool",
"us-southeast",
"postgresql/13.2",
"g6-standard-1",
cluster_size=3,
)
except Exception:
pass

self.assertEqual(m.method, "post")
self.assertEqual(m.call_url, "/databases/postgresql/instances")
Expand Down

0 comments on commit 8be1d5f

Please sign in to comment.