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

validate that cv warning to force promote #14316

Merged

Conversation

vijaysawant
Copy link
Contributor

Problem Statement

CU Case - Test cv promote shows warning of 'force promotion' for out of sequence LCE
BZ 2125728

Solution

Added automation coverage

Related Issues

NA

@vijaysawant vijaysawant added Stream Introduced in or relating directly to Satellite Stream/Master 6.15.z Introduced in or relating directly to Satellite 6.15 CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing labels Mar 8, 2024
@vijaysawant vijaysawant marked this pull request as ready for review March 8, 2024 12:04
@vijaysawant vijaysawant requested a review from a team as a code owner March 8, 2024 12:04
Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

One small change plus there would be some other proposal for change, which would be better discussed live at meet.

tests/foreman/cli/test_contentview.py Show resolved Hide resolved
Copy link
Contributor

@damoore044 damoore044 left a comment

Choose a reason for hiding this comment

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

looks good! pending :customerscenario: true addition recommended by @vsedmik

@vijaysawant vijaysawant force-pushed the cu-case-cv-warn-force-promotion branch from b4a38c7 to d602636 Compare March 11, 2024 08:52
@vsedmik
Copy link
Contributor

vsedmik commented Mar 11, 2024

As discussed off-line, I believe the key point here is to assert that a single-step promotion passes without error/warning even though the previous env is missing (was skipped). I would suggest these steps:

  1. Create the LCE path: Library > Test > PreProd > Prod
  2. Create a CV and publish it into Library.
  3. Try to skip-promote the CV from Library to PreProd - this should fail with warning.
  4. Try to skip-promote the CV from Library to PreProd - this time with force - it should succeed and at the same time you get the necessary setup (env Test is missing in the path and CV is in PreProd) for the final step.
  5. Try to promote from PreProd to Prod - this must succeed without warning now, since we are doing just single-step promotion (ignoring the previous LCE is missing)


:customerscenario: true
"""
# 1. Create an environment path ex- Library >> Test >> Preprod >> Prod
Copy link
Contributor

Choose a reason for hiding this comment

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

Should all this entity creation be turned into a fixture?

@lhellebr
Copy link
Contributor

What Vladimir is suggesting sounds like a very good test proposal but I'd leave it up to you if it is or is not out of scope of this PR.

But more importantly, I doubt this should be marked with the :BZ: in docstring. Because I think this tests something else than what the BZ is about. Its title is: Content view Promote always warns for 'Force promotion' even if correct path is followed.

@vijaysawant vijaysawant marked this pull request as draft March 14, 2024 16:20
@vijaysawant vijaysawant force-pushed the cu-case-cv-warn-force-promotion branch from d602636 to f6944ed Compare March 15, 2024 12:58
@vijaysawant vijaysawant marked this pull request as ready for review March 15, 2024 12:59
Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

Just a few nitpicks, non-blocking.

tests/foreman/cli/test_contentview.py Outdated Show resolved Hide resolved
tests/foreman/cli/test_contentview.py Outdated Show resolved Hide resolved
tests/foreman/cli/test_contentview.py Show resolved Hide resolved
Copy link
Contributor

@sambible sambible left a comment

Choose a reason for hiding this comment

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

PRT and lgtm

Copy link
Contributor

@damoore044 damoore044 left a comment

Choose a reason for hiding this comment

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

nice work! pending @vsedmik 's comments on docstrings

vijaysawant and others added 3 commits March 18, 2024 17:19
@vsedmik
Copy link
Contributor

vsedmik commented Mar 18, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_contentview.py -k validate_force_promote_warning

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 6105
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_contentview.py -k validate_force_promote_warning --external-logging
Test Result : ========== 1 passed, 131 deselected, 1 warning in 1149.81s (0:19:09) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 18, 2024
@vsedmik vsedmik merged commit 6a59883 into SatelliteQE:master Mar 18, 2024
9 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 18, 2024
* validate that cv warning to force promote

* small change in step

Co-authored-by: vsedmik <[email protected]>

* add new line

Co-authored-by: vsedmik <[email protected]>

* small change in commented line

Co-authored-by: vsedmik <[email protected]>

---------

Co-authored-by: vsedmik <[email protected]>
(cherry picked from commit 6a59883)
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
* validate that cv warning to force promote

* small change in step

Co-authored-by: vsedmik <[email protected]>

* add new line

Co-authored-by: vsedmik <[email protected]>

* small change in commented line

Co-authored-by: vsedmik <[email protected]>

---------

Co-authored-by: vsedmik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants