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

Make DS Project tests independent #978

Merged
merged 22 commits into from
Oct 23, 2023

Conversation

bdattoma
Copy link
Contributor

@bdattoma bdattoma commented Oct 13, 2023

This PR wants to address the issue of having the DS Project tests dependent on each other which makes difficult moving the tests in and out of a Quality Gate.

How
The way to achieve some level of indendence implemented by this PR is the following:

  1. having one common DS project created as part of Suite Setup
  2. every test which needs a resource, must create it as part of test setup and delete it in the test teardown
    • this was to me a bit concerning bcos it would increase the total duration of testing (a workbench takes around 40-50s to be up and running). However I tried mitigating this issue by merging some smaller test cases together.
    • time impact is going to be assessed as part of the PR testing

The PR required many changes and I'll try to test as much as I can the impacted Suites

Merged test cases

  • ODS-1817,ODS-1815,ODS-1813,ODS-1784
  • ODS-1823, ODS-1818
    The merge happened only at code repo level, not in Polarion: the new cumulative test case reports all the aggregated test IDs as RF Tags

@bdattoma bdattoma requested review from lugi0 and jstourac October 13, 2023 16:37
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robocop found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@bdattoma bdattoma self-assigned this Oct 13, 2023
@bdattoma bdattoma added needs testing Needs to be tested in Jenkins enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) do not merge Do not merge this yet please labels Oct 13, 2023
@github-actions
Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
366 0 0 366 100

Signed-off-by: bdattoma <[email protected]>
Signed-off-by: bdattoma <[email protected]>
@bdattoma
Copy link
Contributor Author

bdattoma commented Oct 16, 2023

PR Validation:

  1. rhods-ci-pr-test/2039 DS project Suite SUCCESS (23 minutes vs 28 minutes without this PR). "Edit" suite FAILED -> fixed and will re-test
    • re-test edit suite after fixes: rhods-ci-pr-test/2043 SUCCESS (3 minutes vs 1 minutes without this PR)
  2. rhods-ci-pr-test/2044 DS project Suite excluding Smoke tag and (Auto/Product)Bugs: SUCCESS (12 minutes)
  3. rhods-ci-pr-test DS project Suite Smoke only SUCCESS (10 minutes vs 7 minutes)
  4. rhods-ci-pr-test/2047 DS project additional suite excluding Resource-GPU tag SUCCESS (17 minutes vs 9 minutes)
  5. rhods-ci-pr-test/2048/ Smoke (42 minutes vs 34 minutes). 4 Failures, but not related to this PR.
  6. tested single test cases in isolation SUCCESS - I didn't do it via jenkins for sake of time, quite many test cases to check.

NOTE: dryrun failure is not caused by the code in this PR but by Embedded Operator test. We can fix in a separate PR, it's not critical

@bdattoma bdattoma removed the do not merge Do not merge this yet please label Oct 19, 2023
@bdattoma bdattoma added verified This PR has been tested with Jenkins and removed needs testing Needs to be tested in Jenkins labels Oct 19, 2023
@bdattoma bdattoma added the ⚠️ high priority review I need this to be reviewed ASAP label Oct 19, 2023
Copy link
Contributor

@FedeAlonso FedeAlonso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of fixes (indentations, RETURN, etc) that can be easily fixed following the alerts.
LGTM

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@jgarciao jgarciao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some commented code that could be removed in this or a follow-up PR. Otherwise LGTM

@bdattoma
Copy link
Contributor Author

There is some commented code that could be removed in this or a follow-up PR. Otherwise LGTM

yeah, sorry for that. I originally left some of them bcos I wasn't sure if they were still needed for test stability. I will remove commented in code in a next PR

@bdattoma bdattoma merged commit 98a4185 into red-hat-data-services:master Oct 23, 2023
jgarciao pushed a commit to jgarciao/ods-ci that referenced this pull request Nov 6, 2023
* remove ODS-1812

Signed-off-by: bdattoma <[email protected]>

* stop workbench from starting status

Signed-off-by: bdattoma <[email protected]>

* add kw to delete single project from cli

Signed-off-by: bdattoma <[email protected]>

* first attempt for adding independence

Signed-off-by: bdattoma <[email protected]>

* move tests to Edit suite

Signed-off-by: bdattoma <[email protected]>

* refactor clean project kw and move some tests

Signed-off-by: bdattoma <[email protected]>

* remove common workbench and refactor

Signed-off-by: bdattoma <[email protected]>

* fix ODS-1970 and 1971 - mark autobug on 1819

Signed-off-by: bdattoma <[email protected]>

* fix misc failures

Signed-off-by: bdattoma <[email protected]>

* more fixes

Signed-off-by: bdattoma <[email protected]>

* fix 1813 and add wait for workbench deletion

Signed-off-by: bdattoma <[email protected]>

* add small sleep before checking secret deletion

Signed-off-by: bdattoma <[email protected]>

* add project creation in suite setup for Edit suite

Signed-off-by: bdattoma <[email protected]>

* minor changes suite setup/teardown in DSprojects suite

Signed-off-by: bdattoma <[email protected]>

* fix ods-1826

Signed-off-by: bdattoma <[email protected]>

* fix setup edit suite

Signed-off-by: bdattoma <[email protected]>

* start test from ds project home page

Signed-off-by: bdattoma <[email protected]>

* fix dc edit test + edit dc name

Signed-off-by: bdattoma <[email protected]>

* fix edit workbench kw

Signed-off-by: bdattoma <[email protected]>

* add description to multiprojects test

Signed-off-by: bdattoma <[email protected]>

---------

Signed-off-by: bdattoma <[email protected]>
ChughShilpa pushed a commit to ChughShilpa/ods-ci that referenced this pull request Nov 28, 2023
* remove ODS-1812

Signed-off-by: bdattoma <[email protected]>

* stop workbench from starting status

Signed-off-by: bdattoma <[email protected]>

* add kw to delete single project from cli

Signed-off-by: bdattoma <[email protected]>

* first attempt for adding independence

Signed-off-by: bdattoma <[email protected]>

* move tests to Edit suite

Signed-off-by: bdattoma <[email protected]>

* refactor clean project kw and move some tests

Signed-off-by: bdattoma <[email protected]>

* remove common workbench and refactor

Signed-off-by: bdattoma <[email protected]>

* fix ODS-1970 and 1971 - mark autobug on 1819

Signed-off-by: bdattoma <[email protected]>

* fix misc failures

Signed-off-by: bdattoma <[email protected]>

* more fixes

Signed-off-by: bdattoma <[email protected]>

* fix 1813 and add wait for workbench deletion

Signed-off-by: bdattoma <[email protected]>

* add small sleep before checking secret deletion

Signed-off-by: bdattoma <[email protected]>

* add project creation in suite setup for Edit suite

Signed-off-by: bdattoma <[email protected]>

* minor changes suite setup/teardown in DSprojects suite

Signed-off-by: bdattoma <[email protected]>

* fix ods-1826

Signed-off-by: bdattoma <[email protected]>

* fix setup edit suite

Signed-off-by: bdattoma <[email protected]>

* start test from ds project home page

Signed-off-by: bdattoma <[email protected]>

* fix dc edit test + edit dc name

Signed-off-by: bdattoma <[email protected]>

* fix edit workbench kw

Signed-off-by: bdattoma <[email protected]>

* add description to multiprojects test

Signed-off-by: bdattoma <[email protected]>

---------

Signed-off-by: bdattoma <[email protected]>
ChughShilpa pushed a commit to ChughShilpa/ods-ci that referenced this pull request Jan 2, 2024
* remove ODS-1812

Signed-off-by: bdattoma <[email protected]>

* stop workbench from starting status

Signed-off-by: bdattoma <[email protected]>

* add kw to delete single project from cli

Signed-off-by: bdattoma <[email protected]>

* first attempt for adding independence

Signed-off-by: bdattoma <[email protected]>

* move tests to Edit suite

Signed-off-by: bdattoma <[email protected]>

* refactor clean project kw and move some tests

Signed-off-by: bdattoma <[email protected]>

* remove common workbench and refactor

Signed-off-by: bdattoma <[email protected]>

* fix ODS-1970 and 1971 - mark autobug on 1819

Signed-off-by: bdattoma <[email protected]>

* fix misc failures

Signed-off-by: bdattoma <[email protected]>

* more fixes

Signed-off-by: bdattoma <[email protected]>

* fix 1813 and add wait for workbench deletion

Signed-off-by: bdattoma <[email protected]>

* add small sleep before checking secret deletion

Signed-off-by: bdattoma <[email protected]>

* add project creation in suite setup for Edit suite

Signed-off-by: bdattoma <[email protected]>

* minor changes suite setup/teardown in DSprojects suite

Signed-off-by: bdattoma <[email protected]>

* fix ods-1826

Signed-off-by: bdattoma <[email protected]>

* fix setup edit suite

Signed-off-by: bdattoma <[email protected]>

* start test from ds project home page

Signed-off-by: bdattoma <[email protected]>

* fix dc edit test + edit dc name

Signed-off-by: bdattoma <[email protected]>

* fix edit workbench kw

Signed-off-by: bdattoma <[email protected]>

* add description to multiprojects test

Signed-off-by: bdattoma <[email protected]>

---------

Signed-off-by: bdattoma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) verified This PR has been tested with Jenkins ⚠️ high priority review I need this to be reviewed ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants