Skip to content

Commit

Permalink
Add prefix to test tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzigold authored and elfiesmelfie committed Oct 1, 2024
1 parent 8aef4fb commit 3f163bf
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion callback_plugins/custom_junit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions roles/telemetry_autoscaling/tasks/configure_heat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions roles/telemetry_autoscaling/tasks/creating_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
stack_external_network: public

- name: |
Create the stack
TEST Create the stack
RHOSO-12648
ansible.builtin.shell: |
#source ~/overcloudrc;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions roles/telemetry_autoscaling/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
10 changes: 5 additions & 5 deletions roles/telemetry_autoscaling/tasks/test_autoscaling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 3f163bf

Please sign in to comment.