-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix tests #638
Fix tests #638
Conversation
https://github.com/yast/yast-ruby-bindings/blob/9a50d95be89f3dfe81cd109e6bf89a5fbedc48eb/src/ruby/yast/y2logger.rb#L48 shows that we're using a standard logger, and the Ruby documentation shows that passing a block will avoid evaluating it when debugging is disabled. So please use BTW that Ruby docs is so skillful in hiding the useful information, it sucks |
@mvidner sadly block form does not work, as we do not limit access to debug in logger level but on ruby-bindings level try yourself in irb:
|
Ah, good point. Then what about
|
issue created yast/yast-ruby-bindings#290 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes so far look good, but what about
- the other failure "unexpected message :define_method with ("switch_to_richtext=")", do you need help?
- version + changelog?
@@ -66,7 +66,8 @@ | |||
|
|||
it "does not display any popup" do | |||
# stub empty Yast::Popup so any method call would raise an exception | |||
stub_const("Yast::Popup", double) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean that any such stub_const("Yast::Foo", double)
will fail or has bug? We have more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yast/yast-update/test/inst_update_partition_auto_test.rb
15: stub_const("Yast::FileSystems", double)
yast/yast-installation/test/snapshots_finish_test.rb
10: stub_const("Yast::StorageSnapper", double)
and more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I think there is still a chance that another fix will be needed in ruby-bindings because of the following, but I will not let that block this PR.
Does that mean that any such
stub_const("Yast::Foo", double)
will fail or has bug? We have more: https://github.com/search?q=org%3Ayast+stub_const&type=code
For the record, the |
✔️ Public Jenkins job #207 successfully finished |
❌ Internal Jenkins job #123 failed |
❌ Internal Jenkins job #124 failed |
Problem
build failing at https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:G/yast2-packager/standard/x86_64
Solution
Fix test to use proper string instead of Pathname.
Testing