Skip to content

Align test block with goreleaser: offline-only assertions#1

Closed
ilyazub wants to merge 1 commit intomainfrom
align-go-tests
Closed

Align test block with goreleaser: offline-only assertions#1
ilyazub wants to merge 1 commit intomainfrom
align-go-tests

Conversation

@ilyazub
Copy link
Copy Markdown
Contributor

@ilyazub ilyazub commented Mar 29, 2026

The goreleaser config was updated in serpapi/serpapi-cli#2 to use 5 offline-only brew test assertions (network calls fail in Homebrew sandbox environments). This PR aligns the tap formula test block to match.

Removed (network-dependent):

  • serpapi search q=coffee (unauthenticated API call)
  • --api-key invalid search q=coffee (live error check)
  • --api-key invalid account (live error check)
  • serpapi locations q=Austin (live API call)
  • --api-key invalid archive abc123 (live error check)

Kept / Added (fully offline):

  • version string
  • --help output
  • no-key account → exit 2
  • no-key archive → exit 2
  • invalid archive ID format → exit 2

Note: url/sha256 still point to v0.1.1 — goreleaser will auto-update them when v0.2.0 is tagged.

Replace 7 network-dependent assertions with 5 offline-only ones.
Network tests fail in Homebrew sandbox environments. New tests
only verify behavior that requires no outbound connections:
- version string injection
- --help output
- no-key account/archive exit 2
- invalid archive ID format exit 2
@ilyazub ilyazub closed this Mar 31, 2026
@ilyazub ilyazub deleted the align-go-tests branch March 31, 2026 21:34
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