Skip to content

test(deploy/vm): setup-vm.test.sh's two OIDC sed -i lines are portable (#720) - #725

Closed
webchang wants to merge 1 commit into
rossoctl:mainfrom
webchang:fix/720-setup-vm-test-bsd-sed
Closed

webchang wants to merge 1 commit into
rossoctl:mainfrom
webchang:fix/720-setup-vm-test-bsd-sed

Conversation

@webchang

@webchang webchang commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Fixes the first of the three stops in #720.

The SH_OIDC_CLIENT_SECRET and SH_IDENTITY_PROVIDER cases from #701 (294054a) used sed -i '…' FILE. On macOS, BSD sed takes the next word after -i as the backup suffix, so deploy/vm/tests/setup-vm.test.sh stopped there with invalid command code.

This PR uses the form the file's other sed -i lines already use: sed -i.bak '…' FILE && rm -f FILE.bak. It changes two lines, both in the test; setup-vm.sh is unchanged.

Tested: bash deploy/vm/tests/setup-vm.test.sh on macOS with bash 5: 104 ok, 0 not ok. The two bash 3.2 stops in #720 are separate, and wait for the maintainers' choice of approach.

Assisted-By: Claude Code

rossoctl#720)

The SH_OIDC_CLIENT_SECRET and SH_IDENTITY_PROVIDER cases added in rossoctl#701 used `sed -i '…' FILE`. BSD sed (macOS) reads the next word after -i as the backup suffix, so the test stopped there with "invalid command code". Use the form the file's other sed -i lines already use: `sed -i.bak '…' FILE && rm -f FILE.bak`. Test-only; setup-vm.sh is unchanged. On macOS with bash 5: 104 ok, 0 not ok.

Refs rossoctl#720.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Rong Chang <[email protected]>
@webchang
webchang force-pushed the fix/720-setup-vm-test-bsd-sed branch from 90eaa72 to 084f3ab Compare November 12, 2026 04:24
@pdettori pdettori added the ready-for-ai-review Request automated AI code review from clawgenti label Nov 12, 2026

@clawgenti clawgenti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

All checks pass. Ready for human review.

Both changed lines now use the sed -i.bak … && rm -f ….bak form that the file's other sed -i lines already use. On head, all 8 sed -i uses in deploy/vm/tests/setup-vm.test.sh are -i.bak (none are bare), and bash -n passes.

Author: webchang (MEMBER — maintainer)
Areas reviewed: Shell (test script)
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: passing

Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).

@webchang

Copy link
Copy Markdown
Member Author

Closing as superseded. The same two lines were fixed on main in #717's merge (e1d57b6: sed -i.bak … && rm -f ….bak, the form this PR used). On main at d15b807, deploy/vm/tests/setup-vm.test.sh passes on macOS with bash 5 (0 not ok), so this PR has nothing left to change, and it now conflicts. Thanks to whoever folded it in.

#720 stays open for its two bash 3.2 stops: mapfile in setup-vm.test.sh is still there on main, and build-snapshot.test.sh's vfs_out case is still to look at.

Assisted-By: Claude Code

@webchang webchang closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ai-review Request automated AI code review from clawgenti

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants