-
Notifications
You must be signed in to change notification settings - Fork 582
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
snapstate,many: implement snap install --unaliased #3375
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3375 +/- ##
==========================================
+ Coverage 77.53% 77.54% +0.01%
==========================================
Files 367 367
Lines 25156 25167 +11
==========================================
+ Hits 19504 19516 +12
+ Misses 3904 3903 -1
Partials 1748 1748
Continue to review full report at Codecov.
|
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 "--unaliased" name sounds a little weird to me. How about '--no-aliases'? Otherwise looks good.
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.
Can you add a test that installs a snap with --unaliased
and then refreshes?
Also, could you add Unaliased to TestEnableRunThrough
?
if err != nil { | ||
return snapstate.Flags{}, err | ||
} | ||
if inst.Unaliased { |
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.
is this better, or worse than flags.Unaliased = inst.Unaliased
?
Can you add a test that installs a snap with --unaliased and then refreshes? Also, could you add Unaliased to TestEnableRunThrough? |
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 a trivial suggestion, but LGTM with or without it.
@@ -797,6 +798,17 @@ func (inst *snapInstruction) modeFlags() (snapstate.Flags, error) { | |||
return modeFlags(inst.DevMode, inst.JailMode, inst.Classic) | |||
} | |||
|
|||
func (inst *snapInstruction) installFlags() (snapstate.Flags, error) { |
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.
Do we need a separate method for this? Feels like it might be in modeFlags itself.
No description provided.