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

Merge function and end2end testcases into a single set #396

Open
andy-maier opened this issue May 6, 2021 · 2 comments · Fixed by #544
Open

Merge function and end2end testcases into a single set #396

andy-maier opened this issue May 6, 2021 · 2 comments · Fixed by #544

Comments

@andy-maier
Copy link
Member

andy-maier commented May 6, 2021

Today, the function testcases and the end2end testcases have separate test code, but perform tests at the same level, whereby the function tests build a mocked HMC in the test code, and the end2nd tests work against a real HMC, but both test against nearly the complete stack of zhmc ansible module code.

This duplicates the effort for writing test code.

Eliminate the duplication by having one set of test functions that is run against mocked HMCs and against real HMCs. The zhmcclient.testutils support in zhmcclient 1.2.0 (that was already used in PR #510) provides the basis for that.

Staging:

  • Stage 1: POC with the zhmc_user module (since that has fairly complete end2end test code). The resulting test code should not miss anything that was done in the function or end2end test code.
  • Stage 2: Convert all other modules.
@andy-maier andy-maier self-assigned this Apr 10, 2022
@andy-maier andy-maier added this to the 1.1.0 milestone Apr 10, 2022
@andy-maier andy-maier changed the title Common testcases for mock and end2end environments Convert function testcases to use mocked HMC definitions Apr 10, 2022
@andy-maier andy-maier changed the title Convert function testcases to use mocked HMC definitions Merge function and end2end testcases into a single set Apr 10, 2022
@andy-maier andy-maier modified the milestones: 1.1.0, 1.2.0 May 17, 2022
@andy-maier
Copy link
Member Author

andy-maier commented Jun 26, 2022

PR #535 enables running the end2end tests against a mocked environment, with all existing end2end testcases (zhmc_partition, zhmc_user). This PR does not yet merge the function and end2end testcases, but I think it still shows how this would work and thus demonstrates the POC from stage 1 defined above.

In stage 2, the function testcases should be merged into the end2end testcases using this concept.

@andy-maier
Copy link
Member Author

PR #544 merges the function tests for list modules into the end2end tests.

@andy-maier andy-maier reopened this Jun 30, 2022
@andy-maier andy-maier removed this from the 1.2.0 milestone Nov 29, 2022
@andy-maier andy-maier removed their assignment Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment