From 3f163bfbbfc6b869fdfb4686c75d03b2f0808bf7 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Tue, 1 Oct 2024 09:47:24 -0400 Subject: [PATCH] Add prefix to test tasks --- callback_plugins/custom_junit.py | 2 +- .../tasks/configure_heat.yml | 6 +++--- .../tasks/creating_stack.yml | 16 ++++++++-------- roles/telemetry_autoscaling/tasks/main.yml | 6 +++--- .../tasks/test_autoscaling.yml | 10 +++++----- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/callback_plugins/custom_junit.py b/callback_plugins/custom_junit.py index 9f297257..e69a1bef 100644 --- a/callback_plugins/custom_junit.py +++ b/callback_plugins/custom_junit.py @@ -21,7 +21,7 @@ def __init__(self): # Update this to parse these values from the config file, as well as the env. self._output_dir = os.path.expanduser("~/.ansible.log") # self._test_case_prefix = os.getenv('JUNIT_TEST_CASE_PREFIX', '[TEST]') - self._test_case_prefix = os.getenv('JUNIT_TEST_CASE_PREFIX', '') + self._test_case_prefix = os.getenv('JUNIT_TEST_CASE_PREFIX', 'TEST') #self._fail_on_ignore = os.getenv('JUNIT_FAIL_ON_IGNORE', 'False').lower() self._fail_on_ignore = 'true' # this is needed because we use "ignore_errors" on the playbooks so that all the tests are run self._include_setup_tasks_in_report = os.getenv('JUNIT_INCLUDE_SETUP_TASKS_IN_REPORT', 'False').lower() diff --git a/roles/telemetry_autoscaling/tasks/configure_heat.yml b/roles/telemetry_autoscaling/tasks/configure_heat.yml index 048bd901..c2731f65 100644 --- a/roles/telemetry_autoscaling/tasks/configure_heat.yml +++ b/roles/telemetry_autoscaling/tasks/configure_heat.yml @@ -28,14 +28,14 @@ # TODO: Pass the parameters correctly. When I tried to pass the parameters # into the template.yaml file, they weren't passed to the instance initially. - name: | - Configure heat template for automatically scaling instances + TEST Configure heat template for automatically scaling instances RHOSO-12657 ansible.builtin.template: src: instance.yaml.j2 dest: ~/templates/autoscaling/vnf/instance.yaml - name: | - Create the resource to reference in the heat template + TEST Create the resource to reference in the heat template RHOSO-12658 ansible.builtin.copy: dest: ~/templates/autoscaling/vnf/resources.yaml @@ -44,7 +44,7 @@ "OS::Nova::Server::VNF": ./instance.yaml - name: | - Create the deployment template for heat to control instance scaling + TEST Create the deployment template for heat to control instance scaling RHOSO-12659 ansible.builtin.template: dest: ~/templates/autoscaling/vnf/template.yaml diff --git a/roles/telemetry_autoscaling/tasks/creating_stack.yml b/roles/telemetry_autoscaling/tasks/creating_stack.yml index bb3f0ea3..e820657e 100644 --- a/roles/telemetry_autoscaling/tasks/creating_stack.yml +++ b/roles/telemetry_autoscaling/tasks/creating_stack.yml @@ -24,7 +24,7 @@ stack_external_network: public - name: | - Create the stack + TEST Create the stack RHOSO-12648 ansible.builtin.shell: | #source ~/overcloudrc; @@ -41,7 +41,7 @@ - name: | - Verify that the stack was created successfully + TEST Verify that the stack was created successfully RHOSO-12704 ansible.builtin.shell: | # source ~/overcloudrc; @@ -53,7 +53,7 @@ - name: | - Verify that the stack resources are created + TEST Verify that the stack resources are created RHOSO-12650 ansible.builtin.shell: | # source ~/overcloudrc; @@ -66,7 +66,7 @@ #failed_when: '"CREATE_COMPLETE" not in result.stdout' - name: | - Verify that ceilometer_cpu metric exist + TEST Verify that ceilometer_cpu metric exist RHOSO-12707 ansible.builtin.shell: | # source ~/overcloudrc; @@ -79,7 +79,7 @@ var: result - name: | - Verify that an instance was launched by the stack creation + TEST Verify that an instance was launched by the stack creation RHOSO-12651 ansible.builtin.shell: | # source ~/overcloudrc; @@ -89,7 +89,7 @@ failed_when: result.rc >= 1 - name: | - Verify that the alarms were created for the stack + TEST Verify that the alarms were created for the stack RHOSO-12652 ansible.builtin.shell: | # source ~/overcloudrc; @@ -112,7 +112,7 @@ register: physical_resource_id_high - name: | - Verify physical_resource_id match the alarm id for cpu_alarm_low + TEST Verify physical_resource_id match the alarm id for cpu_alarm_low RHOSO-12653 ansible.builtin.shell: | # source ~/overcloudrc; @@ -122,7 +122,7 @@ - physical_resource_id_low.stdout != alarm_id_low.stdout - name: | - Verify physical_resource_id match the alarm id for cpu_alarm_high + TEST Verify physical_resource_id match the alarm id for cpu_alarm_high RHOSO-12654 ansible.builtin.shell: | # source ~/overcloudrc; diff --git a/roles/telemetry_autoscaling/tasks/main.yml b/roles/telemetry_autoscaling/tasks/main.yml index 3547da17..4e2f8b35 100644 --- a/roles/telemetry_autoscaling/tasks/main.yml +++ b/roles/telemetry_autoscaling/tasks/main.yml @@ -3,7 +3,7 @@ # TODO: Update the pre-checks to include the resources that the stack expects to exist # i.e. networks, flavor, image, security group - name: | - Test services are enabled for autoscaling + TEST Test services are enabled for autoscaling RHOSO-12666 when: metrics_backend == "prometheus" ansible.builtin.include_tasks: @@ -21,12 +21,12 @@ tags: setup - name: Launch the stack - ansible.builtin.include_tasks: + ansible.builtin.include_tasks: file: creating_stack.yml tags: create - name: Run the autoscaling tests - ansible.builtin.include_tasks: + ansible.builtin.include_tasks: file: test_autoscaling.yml tags: test diff --git a/roles/telemetry_autoscaling/tasks/test_autoscaling.yml b/roles/telemetry_autoscaling/tasks/test_autoscaling.yml index b556faa9..d913496c 100644 --- a/roles/telemetry_autoscaling/tasks/test_autoscaling.yml +++ b/roles/telemetry_autoscaling/tasks/test_autoscaling.yml @@ -21,7 +21,7 @@ msg: "bad vnf_instance_ip" - name: | - Verfiy the number of instances before scaling + TEST Verfiy the number of instances before scaling RHOSO-12665 ansible.builtin.shell: | # source ~/overcloudrc; @@ -63,7 +63,7 @@ with_items: "{{ vnf_instance_ip.stdout_lines }}" - name: | - Verify that the `cpu_alarm_high` alarm has been triggered + TEST Verify that the `cpu_alarm_high` alarm has been triggered RHOSO-12660 ansible.builtin.shell: | # source ~/overcloudrc; @@ -76,7 +76,7 @@ until: result.stdout == "alarm" - name: | - Verify that the Orchestration service has scaled up the instances + TEST Verify that the Orchestration service has scaled up the instances RHOSO-12661 ansible.builtin.shell: | # source ~/overcloudrc; @@ -97,7 +97,7 @@ minutes: 5 - name: | - Verify that the `cpu_alarm_low` alarm has been triggered + TEST Verify that the `cpu_alarm_low` alarm has been triggered RHOSO-12664 ansible.builtin.shell: | # source ~/overcloudrc; @@ -114,7 +114,7 @@ # prom uses the instance name, so the metadata MIGHT be removed, and a new # check for whether the scaling group has scaled down may be needed. - name: | - Verify that the Orchestration service has scaled down the instances + TEST Verify that the Orchestration service has scaled down the instances RHOSO-12663 ansible.builtin.shell: | # source ~/overcloudrc;