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

[Customer Case]Adding test for invalid release version #13296

Merged

Conversation

ColeHiggins2
Copy link
Member

Adding test to check invalid release versions when updating or creating an activation key using hammer
:BZ: 1895976

@ColeHiggins2 ColeHiggins2 added CLI Issues and PRs involving the CLI CherryPick PR needs CherryPick to previous branches 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Dec 6, 2023
@ColeHiggins2 ColeHiggins2 self-assigned this Dec 6, 2023
@ColeHiggins2 ColeHiggins2 requested a review from a team as a code owner December 6, 2023 20:53
Copy link
Contributor

@vijaysawant vijaysawant left a comment

Choose a reason for hiding this comment

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

  • fixture which is being use for organization needs to check separately on 6.14 and 6.15
  • few non-blocking request for changes
  • use of API and CLI functions suggestion

Otherwise rest of things are good

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

@vijaysawant vijaysawant left a comment

Choose a reason for hiding this comment

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

Ack
Please run PRT comment.

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.

Ack looks good! pending prt

@ColeHiggins2
Copy link
Member Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_activationkey.py -k test_positive_invalid_release_version

reposet=REPOS['kickstart']['rhel8_aps']['reposet'],
releasever=REPOS['kickstart']['rhel8_aps']['version'],
)
Repository.synchronize({'id': rh_repo_id})
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't you remove the import for this and just do

Suggested change
Repository.synchronize({'id': rh_repo_id})
module_target_sat.cli.Repository.synchronize({'id': rh_repo_id})

@ColeHiggins2 ColeHiggins2 force-pushed the test_invalid_release_version branch from e8e24bb to 00b9407 Compare December 15, 2023 19:02
@sambible
Copy link
Contributor

sambible commented Jan 9, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_activationkey.py -k test_positive_invalid_release_version

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.

Looks good, left two comments for @ColeHiggins2 to consider.

PRT failure is unrelated to this PR.


:expectedresults: Invalid release versions should fail and valid release version should succeed

:BZ: 1895976
Copy link
Contributor

Choose a reason for hiding this comment

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

The BZ has medium severity, so I would tend to use :CaseImportance: Medium here instead of the module-default High. Unless there are some other reasons.

{
'organization-id': module_sca_manifest_org.id,
'name': name,
'release-version': 'ThisShouldNotWork',
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be something random via gen_string(...) or parametrized via invalid_values_list from datafactory. Non-blocking.

@vijaysawant
Copy link
Contributor

trigger: test-robottelo
pytest: tests/foreman/cli/test_activationkey.py -k test_positive_invalid_release_version

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.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 CherryPick PR needs CherryPick to previous branches CLI Issues and PRs involving the CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants