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

feat: print jornalctl log before failure of WaitForLogMessage #29

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

locnnil
Copy link
Contributor

@locnnil locnnil commented Apr 29, 2024

renovate bot and others added 4 commits March 1, 2024 13:45
chore(deps): update dependency go to v1.22.1
…retchr-testify-1.x

fix(deps): update module github.com/stretchr/testify to v1.9.0
…l#24)

refact: export env variables to show up in documentation on pkg.go.dev
@locnnil locnnil requested a review from farshidtz April 29, 2024 16:49
utils/config.go Outdated
t.Fatalf("Time out: reached max %d retries.", maxRetry)
t.Logf("Time out: reached max %d retries.", maxRetry)
stdout, _, _ := Exec(t,
fmt.Sprintf("sudo journalctl --lines=10 --no-pager --unit=snap.\"%s\".otbr-agent --priority=notice", snap))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will query the logs of a particular app (otbr-agent) and makes assumptions on the priority level and required number of lines to have sufficient debugging information.

The function could make use of a refactored SnapLogs function, rather than writing a new command.

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.

Update waitForLogMessage to print the tail before failing
2 participants