Skip to content

test(k3s): allow literal shellcheck assertions - #2133

Merged
shunkakinoki merged 2 commits into
mainfrom
codex/kyber-containerd-shellcheck
Jul 19, 2026
Merged

test(k3s): allow literal shellcheck assertions#2133
shunkakinoki merged 2 commits into
mainfrom
codex/kyber-containerd-shellcheck

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • mark SC2016 as intentional in the K3s ShellSpec file, where assertions match literal shell-variable text
  • preserve the repository formatter canonical single-quote style
  • fix the shell-lint failure from merged PR fix(k3s): isolate containerd on dedicated SSD #2132 without changing runtime or host configuration

Verification

  • make shell-check-dev
  • make nix-format-check
  • shellspec spec/k3s_service_activate_spec.sh spec/activate_k3s_spec.sh spec/coverage_spec.sh (134 examples, 0 failures)

@indent-zero

indent-zero Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor
PR Summary

After the follow-up commit 5eb07d1 ("test(k3s): align shellcheck with formatter"), the PR now collapses to a single one-line change: it adds SC2016 to the existing file-level # shellcheck disable= directive at the top of spec/k3s_service_activate_spec.sh. This silences ShellCheck's false-positive on the three grep/should include assertions that intentionally embed $MOUNT_POINT / $MOUNT_LABEL inside single quotes, while keeping the DSL literals in their original formatter-preferred single-quoted form. Spec behavior is unchanged.

  • Changed # shellcheck disable=SC2329# shellcheck disable=SC2016,SC2329.
  • Reverted the three quoting rewrites from the previous commit; the three It blocks now match main verbatim.

Issues

No issues found.

CI Checks

Waiting for CI checks...

@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@mesa-dot-dev

mesa-dot-dev Bot commented Jul 19, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Shell test assertions were updated to match the target scripts’ exact escaped double-quote formatting for containerd setup and disk preparation commands.

Changes

Shell assertion quoting alignment

Layer / File(s) Summary
Update command-output assertions
spec/k3s_service_activate_spec.sh
The k3s setup and prepare-containerd-disk.sh tests now match escaped double quotes around mount points and filesystem labels in grep patterns and expected output.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A bunny checks each quoted line,
Escaped marks now neatly shine.
Mount points hop into their place,
Labels wear a proper face.
Tests agree, and carrots cheer!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the shellcheck assertion quoting and escaping updates in the K3s spec.
Description check ✅ Passed The description accurately summarizes the ShellSpec literal-variable assertion fixes and verification steps.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/kyber-containerd-shellcheck

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates several test assertions in spec/k3s_service_activate_spec.sh by replacing single quotes with double quotes and escaping inner double quotes and variables (such as "$MOUNT_POINT" and "$MOUNT_LABEL") in the grep commands. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@shunkakinoki shunkakinoki changed the title test(k3s): fix shellcheck literal assertions test(k3s): allow literal shellcheck assertions Jul 19, 2026
@mesa-dot-dev

mesa-dot-dev Bot commented Jul 19, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Fixed ShellCheck lint errors (SC2016) in K3s ShellSpec test assertions without affecting runtime or host configurations.

What changed?

  • spec/k3s_service_activate_spec.sh: Disabled the ShellCheck static analysis rule SC2016 (expressions in single quotes) at the top of the test script to preserve literal shell variable patterns in assertions.

Description generated by Mesa. Update settings

@shunkakinoki
shunkakinoki merged commit cf24506 into main Jul 19, 2026
35 of 36 checks passed
@shunkakinoki
shunkakinoki deleted the codex/kyber-containerd-shellcheck branch July 19, 2026 19:17
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.

1 participant