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 29, 2024
1 parent 0f62165 commit 6cbd7d6
Showing 1 changed file with 14 additions and 0 deletions.
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 6cbd7d6

Please sign in to comment.