Skip to content

Commit

Permalink
[IMP] argocd_deployer: Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Nov 22, 2024
1 parent 526bb73 commit fc49c4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions argocd_deployer/models/application_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def create_domain(
search_domain = [("name", "=", domain_name)]
if scope_unique:
search_domain += [("scope", "=", scope)]
else:
search_domain += [("scope_unique", "=", False)]

already_exists = self.search(search_domain, count=True)
if not already_exists:
best_available = domain_name
Expand Down
3 changes: 3 additions & 0 deletions argocd_deployer/tests/test_application_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def test_uniqueness(self):

def test_create_domain(self):
argocd_application_domain = self.env["argocd.application.domain"]
argocd_application_domain.create_domain(
self.app_1, "myapp", scope="dn", scope_unique=True
)
domain = argocd_application_domain.create_domain(
self.app_1, "myapp", scope="odoo"
)
Expand Down

0 comments on commit fc49c4f

Please sign in to comment.