-
Notifications
You must be signed in to change notification settings - Fork 562
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
tests/lib/uc20-create-partitions/main.go: setup a logger for messages #11219
tests/lib/uc20-create-partitions/main.go: setup a logger for messages #11219
Conversation
This is helpful in debugging problems from install.Run() which currently are totally absent since the default logger is the null logger. Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
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.
LGTM
@@ -59,9 +62,12 @@ func (c uc20Constraints) Classic() bool { return false } | |||
func (c uc20Constraints) Grade() asserts.ModelGrade { return asserts.ModelSigned } | |||
|
|||
func main() { | |||
if err := logger.SimpleSetup(); err != nil { |
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.
FWIW maybe also add os.Setenv("SNAPD_DEBUG", "1")
so that we see the logs, unless the test in question is expecting some specific output?
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.
well 2 of the task.yaml's have that already defined in the environment
section so I think it's fine to not include this here IMHO
though I realize now checking there is a third task.yaml which does not have that defined but I think it should
This is for more debug info from the logger when we call uc20-create-partitions. Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Codecov Report
@@ Coverage Diff @@
## master #11219 +/- ##
=======================================
Coverage 78.36% 78.36%
=======================================
Files 922 923 +1
Lines 105131 105192 +61
=======================================
+ Hits 82387 82435 +48
- Misses 17612 17621 +9
- Partials 5132 5136 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This is helpful in debugging problems from install.Run() which currently are
totally absent since the default logger is the null logger.