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 log copy #252
Fix log copy #252
Conversation
require "installation/finish_client" | ||
|
||
module Installation | ||
class CopyLogsFinish < ::Installation::FinishClient |
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.
Just asking. Do we have any convention on naming all these clients living under lib/installation
? Like always using WhateverFinish
for clients inheriting from FinishClient
?
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.
actually no convention...in bootloader it is simple Bootloader/FinishClient
but here it can create collisions so I name it this way. CopyLogs
without finish can confuse reader as it can be seen as common class to copy logs from one place to another.
it "copies logs from instalation to target system" do | ||
allow(Yast::WFM).to receive(:Read).and_return(["y2start.log"]) | ||
|
||
expect(Yast::WFM).to receive(:Execute).with(anything(), /cp/).at_least(:once) |
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.
The y2start.log returned by the previous call is not used in the expectation. Feels strange.
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.
fair comment. I will add it.
LGTM. BTW, if you start working on the SCR helpers, as suggested by you comment, I'm not unhappy with my last attempt. https://github.com/ancorgs/yast-security/blob/pre907907_cleanup/test/SCRStub.rb |
@ancorgs yep, I plan to reuse your stub, but to be generic enough, there is some problems like .target.bash and .target.bash_output and also .local.bash for WFM and not SCR. I worry it won't be extra nice and probably some parts will be repetitive |
That's why I removed things like |
@ancorgs unfortunatelly this won't work as
work only for SCR, because WFM use |
@jreidinger ahm. I see. |
No description provided.