snapd icon indicating copy to clipboard operation
snapd copied to clipboard

cmd/snap: fix snap run command auto completion

Open patriciadomin opened this issue 4 years ago • 5 comments

LP: #1844776

patriciadomin avatar Jan 27 '22 20:01 patriciadomin

Codecov Report

Merging #11315 (3dc8e0b) into master (44fd502) will increase coverage by 0.01%. The diff coverage is 41.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11315      +/-   ##
==========================================
+ Coverage   78.30%   78.31%   +0.01%     
==========================================
  Files         930      930              
  Lines      106430   106464      +34     
==========================================
+ Hits        83344    83382      +38     
+ Misses      17908    17902       -6     
- Partials     5178     5180       +2     
Flag Coverage Δ
unittests 78.31% <41.50%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/snap/complete.go 53.56% <26.08%> (-1.93%) :arrow_down:
cmd/snap/main.go 73.40% <43.47%> (+6.16%) :arrow_up:
cmd/snap/cmd_run.go 60.64% <85.71%> (+0.12%) :arrow_up:
store/cache.go 69.23% <0.00%> (-1.93%) :arrow_down:
cmd/snap/cmd_debug_state.go 70.64% <0.00%> (+0.45%) :arrow_up:
overlord/hookstate/hookmgr.go 75.32% <0.00%> (+0.64%) :arrow_up:

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 44fd502...3dc8e0b. Read the comment docs.

codecov-commenter avatar Jan 27 '22 21:01 codecov-commenter

Thanks for working on this, it seems we have some missing unit tests for cmd/snap/main.go, hence why you didn't catch or notice that this doesn't work for the case where snap run is executed via the symlinks from /snap/bin/hello-world -> /usr/bin/snap. I have a commit here which fixes this and also adds the unit tests we were missing that should fix all of the broken unit tests (which amazingly seems to be all of them :smiley_cat: ) https://github.com/anonymouse64/snapd/commit/24d439d336bbe5b2e6f03c671ec0806ff25310f0

Let me know if you would like me to push this commit to this branch here

anonymouse64 avatar Jan 28 '22 00:01 anonymouse64

Thanks for working on this, it seems we have some missing unit tests for cmd/snap/main.go, hence why you didn't catch or notice that this doesn't work for the case where snap run is executed via the symlinks from /snap/bin/hello-world -> /usr/bin/snap. I have a commit here which fixes this and also adds the unit tests we were missing that should fix all of the broken unit tests (which amazingly seems to be all of them smiley_cat ) anonymouse64@24d439d

Let me know if you would like me to push this commit to this branch here

Yes, please. Thanks

patriciadomin avatar Jan 28 '22 13:01 patriciadomin

@patriciadomin There were some conflicts with the master branch, so I merged master to this branch and pushed to your repo, hope it's ok.

bboozzoo avatar Feb 03 '22 10:02 bboozzoo

Hi @patriciadomin, this work is still useful to us, would you like to continue?

ernestl avatar Feb 27 '24 23:02 ernestl