test(scripts): add bats coverage for ublue-motd and profile.d scripts - #628
Conversation
|
Warning Review limit reached
More reviews will be available in 58 minutes and 58 seconds. Learn how PR review limits work. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #590 Assisted-by: Claude Sonnet 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
65406cc to
9c8fb0b
Compare
hanthor
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Verdict: LGTM 🟢
Excellent test coverage for ublue-motd and profile.d scripts. The mock logging approach (envsubst.stdin, glow.args, glow.stdin, tput.args) makes assertions precise and debuggable. Good edge-case coverage (missing template, missing glow, opt-out, non-tty). Clean quoting fix in source.
Summary
Adds
tests/test_ublue_motd.batscoveringublue-motdand its profile.d companion scripts, which run in every interactive shell session.Test cases
ublue-motd
ublue-motd.sh profile.d
$HOME/.config/no-show-user-motdopt-out toggle — motd is suppressed when file existsumotd.sh profile.d
CI changes
Run bats (ublue-motd)stepNotes
unit-tests.yml is also modified by other test PRs from this sprint. Changes are additive; minor rebases may be needed.
Closes #590