ansible-collections / ibm_zos_core

Red Hat Ansible Certified Content for IBM Z
78 stars 44 forks source link

[Epic][Portability] Ensure test suite execution portability & parallelism #1585

Open fernandofloresg opened 4 months ago

fernandofloresg commented 4 months ago

Is there an existing issue for this?

Enabler description

Testing conducted using the AC tool will enable the execution of tests in parallel, significantly enhancing the efficiency of our testing process. The objective of this epic is to modify the various test suites to ensure that, when these tests are run in parallel—even on the same machine—there are no conflicts. This will involve meticulously identifying and addressing potential issues related to resource contention, data consistency, and test isolation. By achieving this, we aim to improve test execution times and reliability, ultimately fostering a more robust and scalable testing environment.

This initiative was previously attempted with the issue [Enabler] Remove hard coded vol user from test cases #625. Initially, the task did not encompass the removal of all hardcoded elements from the test suite; this requirement was added later. The process of modifying all test suites proved to be costly in terms of testing and PR reviews. However, a significant positive outcome was the development of a random data set name generator, which has since been integrated into many test suites. This generator has enhanced the flexibility and reliability of our testing framework.

We know from experience which things should not be hardcoded:

During the analysis, we identified several test cases containing hardcoded content that could potentially impact the execution of tests in parallel or on systems different from the current VMs used.

Test suites identified have concurrency issues:

Note: To ensure portability, if possible, we should have them run the concurrent executor (CE) at the end of their development. Unfortunately, its only possible to do this from a local environment.

Test suites without hardcoded content:

Ansible module

zos_apf, zos_backup_restore, zos_blockinfile, zos_copy, zos_encode, zos_fetch, zos_find, zos_gather_facts, zos_job_output, zos_job_query, zos_job_submit, zos_lineinfile, zos_mvs_raw, zos_operator, zos_operator_action_query, zos_tso_command, zos_volume_init

AndreMarcel99 commented 2 months ago

[Enabler][Portability] [zos_volume_init] Ensure test suite portability by removing hard coded data issue will be move to the next iteration because we are waiting on a change of ZOAU that will be included on 1.3.3