Skip to content

Conversation

@jmestizo
Copy link
Contributor

Mimic server that returns gzip content encoding and make sure we handle correctly. Without fix the following test fails:

=== RUN   TestScraperHandlesGzipContentEncoding
ERROR: 2025/03/26 21:00:49 /Users/jmestizo/DigitalOcean/github/do-agent/pkg/collector/scraper.go:137: collection failed for "testscraper": failed to create gzip reader: %!w(<nil>)
    scraper_test.go:152:
        	Error Trace:	/Users/jmestizo/DigitalOcean/github/do-agent/pkg/collector/scraper_test.go:152
        	Error:      	Not equal:
        	            	expected: 1
        	            	actual  : 0
        	Test:       	TestScraperHandlesGzipContentEncoding
--- FAIL: TestScraperHandlesGzipContentEncoding (0.00s)

Expected :1
Actual   :0

Mimic server that returns gzip content encoding and make sure we handle
correctly.  Without fix the following test fails:

=== RUN   TestScraperHandlesGzipContentEncoding
ERROR: 2025/03/26 21:00:49 /Users/jmestizo/DigitalOcean/github/do-agent/pkg/collector/scraper.go:137: collection failed for "testscraper": failed to create gzip reader: %!w(<nil>)
    scraper_test.go:152:
        	Error Trace:	/Users/jmestizo/DigitalOcean/github/do-agent/pkg/collector/scraper_test.go:152
        	Error:      	Not equal:
        	            	expected: 1
        	            	actual  : 0
        	Test:       	TestScraperHandlesGzipContentEncoding
--- FAIL: TestScraperHandlesGzipContentEncoding (0.00s)

Expected :1
Actual   :0
@jmestizo jmestizo requested a review from a team as a code owner March 26, 2025 21:09
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.

2 participants