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

Reorganize and extend clients for manual testing #1274

Merged
merged 2 commits into from Dec 22, 2021

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Dec 21, 2021

Problem

We used to have two clients that where there just for the developers to do some manual testing of new features or to verify how YaST behaves in the scenario of a given bug report:

  • proposal_testing to test the initial partitioning proposal made by the installer & the Guided Setup (pretty bad name, BTW, since it does not mention which of the dozens of YaST proposals it refers to)
  • partitioner_testing to test the Partitioner

Both clients contained duplicated code for the mocking part (ie. reading the probed devicegraph from a file).

I wanted to add just another client for manual testing. This time for manually reproducing the behavior of the AutoYaST partitioning proposal. Another separate client would have implied repeating the mocking code a third time.

Solution

Unify all the xxx_testing clients into a single one, keeping as much as possible the syntax of the original command lines. Thus:

  • To test the Partitioner:
    • the old yast2 partitioner_testing /path/to/devicegraph.xml
    • becomes yast2 storage_testing partitioner /path/to/devicegraph.xml
  • To test the regular proposal:
    • the old yast2 proposal_testing /the/devicegraph.xml /the/control_file.xml
    • becomes yast2 storage_testing proposal /the/devicegraph.xml /the/control_file.xml
  • To test the AutoYaST proposal:
    • do yast2 storage_testing autoinst /the/devicegraph.xml /the/profile.xml

The first two work exactly like before. The third one looks like this:

image

@coveralls
Copy link

coveralls commented Dec 21, 2021

Coverage Status

Coverage increased (+0.002%) to 97.742% when pulling 88bf88c on ancorgs:manual_test into c285794 on yast:master.

Copy link
Member

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

src/lib/y2storage/clients/autoinst_manual_test.rb Outdated Show resolved Hide resolved
src/lib/y2storage/clients/manual_test.rb Outdated Show resolved Hide resolved
@ancorgs ancorgs force-pushed the manual_test branch 5 times, most recently from 000f6d3 to 01a12f4 Compare December 22, 2021 13:34
Copy link
Member

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

LGTM

@ancorgs ancorgs merged commit 94d6832 into yast:master Dec 22, 2021
@yast-bot
Copy link

❌ Public Jenkins job #414 failed

@yast-bot
Copy link

❌ Internal Jenkins job #206 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants