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

snapstate,many: implement snap install --unaliased #3375

Merged
merged 5 commits into from
May 23, 2017

Conversation

pedronis
Copy link
Collaborator

No description provided.

@pedronis pedronis added this to the 2.27 milestone May 22, 2017
@codecov-io
Copy link

Codecov Report

Merging #3375 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
client/snap_op.go 81.35% <ø> (ø) ⬆️
overlord/snapstate/flags.go 100% <ø> (ø) ⬆️
cmd/snap/cmd_snap_op.go 68.08% <100%> (+0.07%) ⬆️
daemon/api.go 73.01% <100%> (+0.14%) ⬆️
overlord/snapstate/handlers.go 69.84% <100%> (+0.1%) ⬆️
overlord/ifacestate/helpers.go 62.86% <0%> (ø) ⬆️
interfaces/sorting.go 96.66% <0%> (+3.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2380588...61614f1. Read the comment docs.

Copy link
Contributor

@stolowski stolowski left a 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.

Copy link
Contributor

@chipaca chipaca left a 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 {
Copy link
Contributor

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?

@pedronis
Copy link
Collaborator Author

@chipaca

Can you add a test that installs a snap with --unaliased and then refreshes?
that's a pain as spread tests, I might manage with a managers_test.go test

Also, could you add Unaliased to TestEnableRunThrough?
will do

Copy link
Contributor

@niemeyer niemeyer left a 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) {
Copy link
Contributor

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.

@pedronis pedronis merged commit 27a9d88 into canonical:master May 23, 2017
@pedronis pedronis deleted the install-unaliased branch May 24, 2017 09:27
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.

5 participants