@@ -26,6 +26,7 @@ func (t *closureTransport) RoundTrip(req *http.Request) (*http.Response, error)
26
26
func TestUserAgentHeader (t * testing.T ) {
27
27
var userAgent string
28
28
client := gitpod .NewClient (
29
+ option .WithBearerToken ("My Bearer Token" ),
29
30
option .WithHTTPClient (& http.Client {
30
31
Transport : & closureTransport {
31
32
fn : func (req * http.Request ) (* http.Response , error ) {
@@ -46,6 +47,7 @@ func TestUserAgentHeader(t *testing.T) {
46
47
func TestRetryAfter (t * testing.T ) {
47
48
retryCountHeaders := make ([]string , 0 )
48
49
client := gitpod .NewClient (
50
+ option .WithBearerToken ("My Bearer Token" ),
49
51
option .WithHTTPClient (& http.Client {
50
52
Transport : & closureTransport {
51
53
fn : func (req * http.Request ) (* http.Response , error ) {
@@ -79,6 +81,7 @@ func TestRetryAfter(t *testing.T) {
79
81
func TestDeleteRetryCountHeader (t * testing.T ) {
80
82
retryCountHeaders := make ([]string , 0 )
81
83
client := gitpod .NewClient (
84
+ option .WithBearerToken ("My Bearer Token" ),
82
85
option .WithHTTPClient (& http.Client {
83
86
Transport : & closureTransport {
84
87
fn : func (req * http.Request ) (* http.Response , error ) {
@@ -108,6 +111,7 @@ func TestDeleteRetryCountHeader(t *testing.T) {
108
111
func TestOverwriteRetryCountHeader (t * testing.T ) {
109
112
retryCountHeaders := make ([]string , 0 )
110
113
client := gitpod .NewClient (
114
+ option .WithBearerToken ("My Bearer Token" ),
111
115
option .WithHTTPClient (& http.Client {
112
116
Transport : & closureTransport {
113
117
fn : func (req * http.Request ) (* http.Response , error ) {
@@ -137,6 +141,7 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
137
141
func TestRetryAfterMs (t * testing.T ) {
138
142
attempts := 0
139
143
client := gitpod .NewClient (
144
+ option .WithBearerToken ("My Bearer Token" ),
140
145
option .WithHTTPClient (& http.Client {
141
146
Transport : & closureTransport {
142
147
fn : func (req * http.Request ) (* http.Response , error ) {
@@ -162,6 +167,7 @@ func TestRetryAfterMs(t *testing.T) {
162
167
163
168
func TestContextCancel (t * testing.T ) {
164
169
client := gitpod .NewClient (
170
+ option .WithBearerToken ("My Bearer Token" ),
165
171
option .WithHTTPClient (& http.Client {
166
172
Transport : & closureTransport {
167
173
fn : func (req * http.Request ) (* http.Response , error ) {
@@ -181,6 +187,7 @@ func TestContextCancel(t *testing.T) {
181
187
182
188
func TestContextCancelDelay (t * testing.T ) {
183
189
client := gitpod .NewClient (
190
+ option .WithBearerToken ("My Bearer Token" ),
184
191
option .WithHTTPClient (& http.Client {
185
192
Transport : & closureTransport {
186
193
fn : func (req * http.Request ) (* http.Response , error ) {
@@ -208,6 +215,7 @@ func TestContextDeadline(t *testing.T) {
208
215
209
216
go func () {
210
217
client := gitpod .NewClient (
218
+ option .WithBearerToken ("My Bearer Token" ),
211
219
option .WithHTTPClient (& http.Client {
212
220
Transport : & closureTransport {
213
221
fn : func (req * http.Request ) (* http.Response , error ) {
0 commit comments