Skip to content

Commit 0fe62cd

Browse files
committed
Remove network-dependent brew tests; keep offline-only assertions
Homebrew formula tests run in a sandboxed/offline environment. Replace the 6 live-network assertions (unauthenticated search, locations, invalid key errors) with 5 offline assertions that exit before any network call: version, --help, no-key account/archive (exit 2), invalid archive ID (exit 2).
1 parent 0734cbc commit 0fe62cd

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

.goreleaser.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ brews:
5959
test: |
6060
assert_match version.to_s, shell_output("#{bin}/serpapi --version")
6161
assert_match "search", shell_output("#{bin}/serpapi --help")
62-
assert_match "organic_results", shell_output("#{bin}/serpapi search q=coffee")
63-
assert_match "google", shell_output("#{bin}/serpapi search q=coffee --jq .search_parameters.engine")
64-
assert_match "canonical_name", shell_output("#{bin}/serpapi locations q=Austin")
65-
assert_match "Invalid API key", shell_output("#{bin}/serpapi --api-key invalid search q=coffee 2>&1", 1)
66-
assert_match "Invalid API key", shell_output("#{bin}/serpapi --api-key invalid account 2>&1", 1)
6762
assert_match "No API key", shell_output("#{bin}/serpapi account 2>&1", 2)
6863
assert_match "No API key", shell_output("#{bin}/serpapi archive abc123 2>&1", 2)
6964
assert_match "Invalid archive ID", shell_output("#{bin}/serpapi --api-key x archive ../bad 2>&1", 2)
70-
assert_match "api_error", shell_output("#{bin}/serpapi --api-key invalid archive abc123 2>&1", 1)

0 commit comments

Comments
 (0)