Skip to content

Commit 6826f77

Browse files
committed
fix test
1 parent 5b28485 commit 6826f77

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

cmd/buf/internal/command/curl/curl_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,23 @@ func TestWrapPlainTextHTTP2Error(t *testing.T) {
108108

109109
t.Run("nil error", func(t *testing.T) {
110110
t.Parallel()
111-
assert.NoError(t, wrapPlainTextHTTP2Error(nil, &flags{HTTP2PriorKnowledge: true, Reflect: true}, "localhost:80", false))
111+
assert.NoError(t, wrapPlainTextHTTP2Error(nil, true, "localhost:80", false))
112112
})
113113
t.Run("secure URL is untouched", func(t *testing.T) {
114114
t.Parallel()
115-
assert.Same(t, framerErr, wrapPlainTextHTTP2Error(framerErr, &flags{HTTP2PriorKnowledge: true, Reflect: true}, "localhost:443", true))
115+
assert.Same(t, framerErr, wrapPlainTextHTTP2Error(framerErr, true, "localhost:443", true))
116116
})
117117
t.Run("without prior knowledge is untouched", func(t *testing.T) {
118118
t.Parallel()
119-
assert.Same(t, framerErr, wrapPlainTextHTTP2Error(framerErr, &flags{}, "localhost:80", false))
119+
assert.Same(t, framerErr, wrapPlainTextHTTP2Error(framerErr, false, "localhost:80", false))
120120
})
121121
t.Run("other error is untouched", func(t *testing.T) {
122122
t.Parallel()
123-
assert.Same(t, otherErr, wrapPlainTextHTTP2Error(otherErr, &flags{HTTP2PriorKnowledge: true, Reflect: true}, "localhost:80", false))
123+
assert.Same(t, otherErr, wrapPlainTextHTTP2Error(otherErr, true, "localhost:80", false))
124124
})
125125
t.Run("http1 response with prior knowledge is rewritten", func(t *testing.T) {
126126
t.Parallel()
127-
err := wrapPlainTextHTTP2Error(framerErr, &flags{HTTP2PriorKnowledge: true}, "localhost:80", false)
127+
err := wrapPlainTextHTTP2Error(framerErr, true, "localhost:80", false)
128128
require.Error(t, err)
129129
assert.Equal(t,
130130
"the RPC protocol or method requires HTTP/2, but the server at localhost:80 responded with HTTP/1.1 and does not appear to support HTTP/2 over plain-text (h2c): "+framerErr.Error(),

0 commit comments

Comments
 (0)