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

Remove old testsuite #82

Merged
merged 5 commits into from
May 28, 2020
Merged

Remove old testsuite #82

merged 5 commits into from
May 28, 2020

Conversation

dgdavid
Copy link
Member

@dgdavid dgdavid commented May 27, 2020

Problem

The legacy test suite, which makes testing by output to log, is a blocker for the evolution of YaST and is causing compatibility problems with Ruby 2.7 failing to build in Staging:J.

Solution

The YaST team has been trying to migrate as much as possible all legacy YaST module test suites to RSpec. However, among others this module is mainly written in Perl and we didn't find a good Perl-mocking tool to make that it less fragile and more useful.

Looking at the history of changes it can be seen that those tests (and the related code) have been mostly untouched for ages, which helps to make the decision of getting rid of them and move on.

So, this PR completely deletes the old test suite without any replacement. Of course, it can be checked any time whether needed thanks to the version control history. Ideally, every new change from now on should be tested with RSpec, although it still needed either, to migrate the existing Perl code to Ruby or find out the way to mock it properly in order to use RSpec for writing the tests.

Other changes

BuildRequires has been also updated

  • adding the necessary dependencies to run the remaining test suite at the build time, and
  • removing not needed samba packages.

Thanks to @mvidner for the clue


See also yast/yast-samba-client#84

Since it is fragile and is somehow stopping the YaST evolution, apart
from causing compatibility problems with Ruby 2.7 and making Travis
fail.

From now on, all new/edited code should be properly tested not relying
in the log output and, ideally, using RSpec.
@dgdavid
Copy link
Member Author

dgdavid commented May 27, 2020

Hey @yast/samba-team, friendly ping here :)

Although I requested review from other YaST team members, I'd like to have a review from you too :)

Thanks in advance!

@dgdavid dgdavid requested a review from a team May 27, 2020 14:14
Copy link
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

LGTM

@mvidner
Copy link
Member

mvidner commented May 27, 2020

The remaining tests in test/ are only run in Travis, not at RPM build time.
Should we BuildRequire rspec and run it?

Also, we BuildRequire several samba packages, probably unnecessarily.

@dmulder
Copy link
Member

dmulder commented May 28, 2020

lgtm

@dgdavid dgdavid merged commit 49842a4 into master May 28, 2020
@dgdavid dgdavid deleted the remove-old-testsuite branch May 28, 2020 14:17
@yast-bot
Copy link
Contributor

✔️ Public Jenkins job #20 successfully finished
✔️ Created OBS submit request #809971

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

5 participants