Skip to content

Commit

Permalink
rollback auto formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Aug 14, 2024
1 parent cc94080 commit 163192c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions config/confighttp/confighttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ import (
"go.opentelemetry.io/collector/extension/auth"
)

const (
headerContentEncoding = "Content-Encoding"
defaultMaxRequestBodySize = 20 * 1024 * 1024 // 20MiB
)
const headerContentEncoding = "Content-Encoding"
const defaultMaxRequestBodySize = 20 * 1024 * 1024 // 20MiB

var defaultCompressionAlgorithms = []string{"", "gzip", "zstd", "zlib", "snappy", "deflate"}

Expand Down
9 changes: 6 additions & 3 deletions config/confighttp/confighttp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import (
"go.opentelemetry.io/collector/internal/localhostgate"
)

type customRoundTripper struct{}
type customRoundTripper struct{
}

var _ http.RoundTripper = (*customRoundTripper)(nil)

Expand Down Expand Up @@ -218,6 +219,7 @@ func TestPartialHTTPClientSettings(t *testing.T) {
assert.EqualValues(t, 0, transport.MaxConnsPerHost)
assert.EqualValues(t, 90*time.Second, transport.IdleConnTimeout)
assert.EqualValues(t, false, transport.DisableKeepAlives)

})
}
}
Expand Down Expand Up @@ -518,8 +520,7 @@ func TestHTTPClientSettingWithAuthConfig(t *testing.T) {
host: &mockHost{
ext: map[component.ID]component.Component{
mockID: &authtest.MockClient{
ResultRoundTripper: &customRoundTripper{}, MustError: true,
},
ResultRoundTripper: &customRoundTripper{}, MustError: true},
},
},
},
Expand Down Expand Up @@ -649,6 +650,7 @@ func TestHTTPServerWarning(t *testing.T) {
require.Len(t, observed.FilterLevelExact(zap.WarnLevel).All(), test.len)
})
}

}

func TestHttpReception(t *testing.T) {
Expand Down Expand Up @@ -1395,6 +1397,7 @@ func TestServerWithDecoder(t *testing.T) {
srv.Handler.ServeHTTP(response, req)
// verify
assert.Equal(t, response.Result().StatusCode, http.StatusOK)

}

func TestServerWithDecompression(t *testing.T) {
Expand Down

0 comments on commit 163192c

Please sign in to comment.