Skip to content

Commit

Permalink
add e2e provider_labels fn test for AA
Browse files Browse the repository at this point in the history
  • Loading branch information
rplevka committed Apr 25, 2024
1 parent d0d026b commit 98c542e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ beaker = ["beaker-client"]
dev = [
"pre-commit",
"pytest",
"pytest-mock",
"ruff"
]
docker = [
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/test_satlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,17 @@ def test_tower_host_mp():
)
res = r_hosts[1].execute(f"ls /root")
assert SETTINGS_PATH.name in res.stdout


def test_tower_provider_labels():
"""Assert labels being created on AAP and OSP metadata
being attached accordingly
"""
with Broker(workflow="deploy-rhel", provider_labels={"l1": "v1", "l2": ""}) as r_host:
# check provider labels in the resulting host object
assert r_host.provider_labels.get("l1") == "v1"
assert r_host.provider_labels.get("l2") == ""
# assert the AAP labels got created on the provider
aap_labels = [l.name for l in r_host._prov_inst.v2.labels.get().results]
assert "l1=v1" in aap_labels
assert "l2" in aap_labels

0 comments on commit 98c542e

Please sign in to comment.