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 CaseImportance case-sensitive in testimony.yaml #8181

Merged

Conversation

mshriver
Copy link
Member

@mshriver mshriver commented Nov 18, 2020

If this is not accepted, I'll have to update #8163 to cover all capitalizations of the marks values.

Blocker:

@mshriver mshriver added dependencies Pull requests that update a dependency file Documentation labels Nov 25, 2020
@codecov
Copy link

codecov bot commented Nov 25, 2020

Codecov Report

Merging #8181 (4f131dc) into master (92fb2ad) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8181      +/-   ##
==========================================
- Coverage   58.41%   58.38%   -0.03%     
==========================================
  Files          78       78              
  Lines        6242     6241       -1     
==========================================
- Hits         3646     3644       -2     
- Misses       2596     2597       +1     
Impacted Files Coverage Δ
robottelo/cli/hammer.py 95.86% <0.00%> (-0.69%) ⬇️
robottelo/constants/__init__.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92fb2ad...4f131dc. Read the comment docs.

@mshriver mshriver marked this pull request as ready for review November 30, 2020 14:22
Copy link

@omkarkhatavkar omkarkhatavkar left a comment

Choose a reason for hiding this comment

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

(env) /home/okhatavk/Satellite/robottelo (update-testimony-importance) $ grep -r ":CaseComponent:.[a-z].*" tests | grep '.py' | grep -v 'Binary'
tests/foreman/sys/test_rename.py::CaseComponent: satellite-change-hostname
(env) /home/okhatavk/Satellite/robottelo (update-testimony-importance) $ grep -r ":CaseImportance:.[a-z].*" tests | grep '.py' | grep -v 'Binary'
tests/foreman/ui/test_contentview.py:    :CaseImportance:High
tests/foreman/cli/test_contentaccess.py::CaseImportance: high
(env) /home/okhatavk/Satellite/robottelo (update-testimony-importance) $ grep -r ":CaseLevel: [a-z].*" tests | grep '.py' | grep -v 'Binary'
(env) /home/okhatavk/Satellite/robottelo (update-testimony-importance) $ grep -r ":CaseAutomation:.[a-z].*" tests | grep '.py' | grep -v 'Binary'

@omkarkhatavkar
Copy link

@mshriver let me know is that me only seeing that

@mshriver
Copy link
Member Author

mshriver commented Dec 1, 2020

@omkarkhatavkar Check the components listing in testimony.yaml, satellite-change-hostname is lowercase, along with one or two other components with this syntax.

If you're suggesting I make every component name consistent, this will require some further changes. Most of them are CamelCase, but several have - separating words, and I didn't want to completely change these.

I'll look at the occurrence of CaseImportance: high, as testimony should have caught this.

I do not believe testimony enforces the whitespace between the token name and value, so CaseImportance:High is technically valid.

@mshriver
Copy link
Member Author

mshriver commented Dec 1, 2020

@omkarkhatavkar tests/foreman/cli/test_contentaccess.py had an invalid CaseImportance as you highlighted, at the module level.

Each test case function within the module specifically defined CaseImportance in its local docblock, so the resulting testimony validation of the squashed token values did not catch this instance. I've removed the line from that test module.

Thanks for being so thorough in your review here!

Make all the testimony tokens case sensitive and consistent
This helps when trying to process and use the the tokens in marking and test collection, like in SatelliteQE#8163
Copy link

@omkarkhatavkar omkarkhatavkar left a comment

Choose a reason for hiding this comment

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

ACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants