Skip to content

test(instance): cover security-group create output format - #6477

Merged
elwinar merged 2 commits into
scaleway:mainfrom
ousamabenyounes:test/security-group-create-output
Oct 19, 2026
Merged

elwinar merged 2 commits into
scaleway:mainfrom
ousamabenyounes:test/security-group-create-output

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

What this adds

Regression coverage for scw instance security-group create -o json. The command had no test; only security-group get was covered.

Two subtests in custom_security_group_test.go:

  • Create — asserts the successful JSON output contract (the wrapped {"security_group": {...}} shape) and exit code 0, with cleanup via AfterFunc.
  • Error — asserts the API error is surfaced on stderr with exit code 1.

Plus the four golden/cassette fixtures they replay against. No production code is touched, so there is no behaviour or compatibility change — this only pins the current output as an explicit contract.

Context

This supersedes #6158. @elwinar approved it there and asked me to sign the commits; sorry for the slow turnaround on that — the request slipped past me and the PR was closed before I came back to it. My apologies for the extra round-trip.

The content is unchanged from the branch you rebased, and the two commits are now SSH-signed.

Refs #6153

@ousamabenyounes
ousamabenyounes requested a review from a team as a code owner October 17, 2026 20:04
@github-actions github-actions Bot added the instance Instance issues, bugs and feature requests label Oct 17, 2026
@elwinar
elwinar added this pull request to the merge queue Oct 19, 2026
Merged via the queue into scaleway:main with commit 2fbdf44 Oct 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

instance Instance issues, bugs and feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants