From 248f2f06e63ca55bb2cf2e300c17675d3257fe57 Mon Sep 17 00:00:00 2001 From: Tasos Papaioannou Date: Fri, 5 Apr 2024 09:44:15 -0400 Subject: [PATCH] Update workflow name in tests. --- broker_settings.yaml.example | 2 +- tests/data/ansible_tower/fake_jobs.json | 2 +- tests/data/ansible_tower/fake_workflows.json | 2 +- tests/data/cli_scenarios/satlab/checkout_latest_rhel.yaml | 2 +- tests/data/cli_scenarios/satlab/checkout_rhel91.yaml | 2 +- tests/data/fake_inventory.yaml | 4 ++-- tests/functional/test_satlab.py | 4 ++-- tests/providers/test_ansible_tower.py | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/broker_settings.yaml.example b/broker_settings.yaml.example index 4a9b38ab..44add3e3 100644 --- a/broker_settings.yaml.example +++ b/broker_settings.yaml.example @@ -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: diff --git a/tests/data/ansible_tower/fake_jobs.json b/tests/data/ansible_tower/fake_jobs.json index 8743b57d..957d15f7 100644 --- a/tests/data/ansible_tower/fake_jobs.json +++ b/tests/data/ansible_tower/fake_jobs.json @@ -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\": \"\"}" diff --git a/tests/data/ansible_tower/fake_workflows.json b/tests/data/ansible_tower/fake_workflows.json index 5b4f3ccf..0f2f3456 100644 --- a/tests/data/ansible_tower/fake_workflows.json +++ b/tests/data/ansible_tower/fake_workflows.json @@ -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\"}" }, { diff --git a/tests/data/cli_scenarios/satlab/checkout_latest_rhel.yaml b/tests/data/cli_scenarios/satlab/checkout_latest_rhel.yaml index 016c39dc..ba240cdd 100644 --- a/tests/data/cli_scenarios/satlab/checkout_latest_rhel.yaml +++ b/tests/data/cli_scenarios/satlab/checkout_latest_rhel.yaml @@ -1 +1 @@ -workflow: deploy-base-rhel +workflow: deploy-rhel diff --git a/tests/data/cli_scenarios/satlab/checkout_rhel91.yaml b/tests/data/cli_scenarios/satlab/checkout_rhel91.yaml index 1754d032..1a545615 100644 --- a/tests/data/cli_scenarios/satlab/checkout_rhel91.yaml +++ b/tests/data/cli_scenarios/satlab/checkout_rhel91.yaml @@ -1,2 +1,2 @@ -workflow: deploy-base-rhel +workflow: deploy-rhel deploy_rhel_version: "9.1" diff --git a/tests/data/fake_inventory.yaml b/tests/data/fake_inventory.yaml index 5663dc92..4ee87101 100644 --- a/tests/data/fake_inventory.yaml +++ b/tests/data/fake_inventory.yaml @@ -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 @@ -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 diff --git a/tests/functional/test_satlab.py b/tests/functional/test_satlab.py index dc48736c..bac090f3 100644 --- a/tests/functional/test_satlab.py +++ b/tests/functional/test_satlab.py @@ -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") @@ -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 diff --git a/tests/providers/test_ansible_tower.py b/tests/providers/test_ansible_tower.py index 957015c4..ae32ce6d 100644 --- a/tests/providers/test_ansible_tower.py +++ b/tests/providers/test_ansible_tower.py @@ -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" @@ -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