Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cmd: pretend we're running on Ubuntu in TestExecInCoreSnapUnsetsDidRe… #4235
Conversation
bboozzoo
requested a review
from
mvo5
Nov 16, 2017
| + restore := release.MockReleaseInfo(&release.OS{ID: "ubuntu"}) | ||
| + defer func() { | ||
| + restore() | ||
| + dirs.SetRootDir(s.fakeroot) |
bboozzoo
Nov 16, 2017
Contributor
No, I actually meant to restore it to whatever was set up by the test suite right here: https://github.com/snapcore/snapd/blob/master/cmd/cmd_test.go#L62
Mocking release info slightly alters how the directories are set up, once it's restored SetRootDir() should also restore the directory paths to their original values.
codecov-io
commented
Nov 16, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #4235 +/- ##
==========================================
+ Coverage 75.87% 75.96% +0.09%
==========================================
Files 440 440
Lines 38295 38439 +144
==========================================
+ Hits 29055 29202 +147
+ Misses 7224 7223 -1
+ Partials 2016 2014 -2
Continue to review full report at Codecov.
|
bboozzoo
added some commits
Nov 17, 2017
|
Thanks for chasing this! |
|
Travis hit a timeout, restarted the build. |
bboozzoo commentedNov 16, 2017
…exec()
Mock distribution os-release so that the test runs in a fixed environment.