Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow name in tests #280

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion broker_settings.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ TestProvider:
# You can set a nickname as a shortcut for arguments
nicks:
rhel7:
workflow: "deploy-base-rhel"
workflow: "deploy-rhel"
deploy_rhel_version: "7.9"
notes: "Requested by broker"
test_nick:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/ansible_tower/fake_jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"related": {
"workflow_nodes": "/api/v2/workflow_jobs/343/workflow_nodes/"
},
"name": "deploy-base-rhel",
"name": "deploy-rhel",
"status": "successful",
"url": "/api/v2/workflow_jobs/1329/",
"extra_vars": "{\"provider\": \"rhv\", \"host_type\": \"\"}"
Expand Down
2 changes: 1 addition & 1 deletion tests/data/ansible_tower/fake_workflows.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": 34,
"type": "workflow_job_template",
"url": "/api/v2/workflow_job_templates/34/",
"name": "deploy-base-rhel",
"name": "deploy-rhel",
"extra_vars": "{\"deploy_scenario\": \"baserhel\", \"deploy_rhel_version\": \"\", \"host_type\": \"host\", \"deploy_flavor\": \"prod-ssd.memory.xs\"}"
},
{
Expand Down
2 changes: 1 addition & 1 deletion tests/data/cli_scenarios/satlab/checkout_latest_rhel.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
workflow: deploy-base-rhel
workflow: deploy-rhel
2 changes: 1 addition & 1 deletion tests/data/cli_scenarios/satlab/checkout_rhel91.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
workflow: deploy-base-rhel
workflow: deploy-rhel
deploy_rhel_version: "9.1"
4 changes: 2 additions & 2 deletions tests/data/fake_inventory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
deploy_rhel_version: '8.6'
deploy_scenario: baserhel
host_type: host
workflow: deploy-base-rhel
workflow: deploy-rhel
_broker_provider: AnsibleTower
_broker_provider_instance: rhv
hostname: dhcp-111.test.example.com
Expand All @@ -13,7 +13,7 @@
deploy_rhel_version: '8.6'
deploy_scenario: baserhel
host_type: host
workflow: deploy-base-rhel
workflow: deploy-rhel
_broker_provider: AnsibleTower
_broker_provider_instance: rhv
hostname: dhcp-121.test.example.com
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_satlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_workflow_query():


def test_tower_host():
with Broker(workflow="deploy-base-rhel") as r_host:
with Broker(workflow="deploy-rhel") as r_host:
res = r_host.execute("hostname")
assert res.stdout.strip() == r_host.hostname
loc_settings_path = Path("broker_settings.yaml")
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_tower_host():


def test_tower_host_mp():
with Broker(workflow="deploy-base-rhel", _count=3) as r_hosts:
with Broker(workflow="deploy-rhel", _count=3) as r_hosts:
for r_host in r_hosts:
res = r_host.execute("hostname")
assert res.stdout.strip() == r_host.hostname
Expand Down
6 changes: 3 additions & 3 deletions tests/providers/test_ansible_tower.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def tower_stub(api_stub, config_stub):


def test_execute(tower_stub):
job = tower_stub.execute(workflow="deploy-base-rhel")
job = tower_stub.execute(workflow="deploy-rhel")
assert "workflow_nodes" in job.related


def test_host_creation(tower_stub):
bx = Broker()
job = tower_stub.execute(workflow="deploy-base-rhel")
job = tower_stub.execute(workflow="deploy-rhel")
host = tower_stub.construct_host(job, bx.host_classes)
assert isinstance(host, bx.host_classes["host"])
assert host.hostname == "fake.host.test.com"
Expand All @@ -109,7 +109,7 @@ def test_workflow_lookup_failure(tower_stub):

def test_host_release_dual_params(tower_stub):
bx = Broker()
job = tower_stub.execute(workflow="deploy-base-rhel")
job = tower_stub.execute(workflow="deploy-rhel")
host = tower_stub.construct_host(job, bx.host_classes)
host._broker_args["source_vm"] = "fake-physical-host"
assert host._broker_args["source_vm"] == host.name
Expand Down