@@ -15,63 +15,63 @@ import (
15
15
"time"
16
16
)
17
17
18
- func postTestError (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
18
+ func postTestError (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
19
19
return & http.Response {
20
20
StatusCode : http .StatusOK ,
21
21
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
22
22
}, errors .New ("failed to run post method" )
23
23
}
24
24
25
- func postAuthTestError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration , _ bool ) (* http.Response , error ) {
25
+ func postAuthTestError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration ) (* http.Response , error ) {
26
26
return & http.Response {
27
27
StatusCode : http .StatusOK ,
28
28
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
29
29
}, errors .New ("failed to run post method" )
30
30
}
31
31
32
- func postTestSuccessButInvalidJSON (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
32
+ func postTestSuccessButInvalidJSON (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
33
33
return & http.Response {
34
34
StatusCode : http .StatusOK ,
35
35
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
36
36
}, nil
37
37
}
38
38
39
- func postTestAppBadGatewayError (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
39
+ func postTestAppBadGatewayError (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
40
40
return & http.Response {
41
41
StatusCode : http .StatusBadGateway ,
42
42
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
43
43
}, nil
44
44
}
45
45
46
- func postAuthTestAppBadGatewayError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration , _ bool ) (* http.Response , error ) {
46
+ func postAuthTestAppBadGatewayError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration ) (* http.Response , error ) {
47
47
return & http.Response {
48
48
StatusCode : http .StatusBadGateway ,
49
49
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
50
50
}, nil
51
51
}
52
52
53
- func postTestAppForbiddenError (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
53
+ func postTestAppForbiddenError (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
54
54
return & http.Response {
55
55
StatusCode : http .StatusForbidden ,
56
56
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
57
57
}, nil
58
58
}
59
59
60
- func postAuthTestAppForbiddenError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration , _ bool ) (* http.Response , error ) {
60
+ func postAuthTestAppForbiddenError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration ) (* http.Response , error ) {
61
61
return & http.Response {
62
62
StatusCode : http .StatusForbidden ,
63
63
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
64
64
}, nil
65
65
}
66
66
67
- func postAuthTestAppUnexpectedError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration , _ bool ) (* http.Response , error ) {
67
+ func postAuthTestAppUnexpectedError (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration ) (* http.Response , error ) {
68
68
return & http.Response {
69
69
StatusCode : http .StatusInsufficientStorage ,
70
70
Body : & fakeResponseBody {body : []byte {0x12 , 0x34 }},
71
71
}, nil
72
72
}
73
73
74
- func postTestQueryNotExecuting (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
74
+ func postTestQueryNotExecuting (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
75
75
dd := & execResponseData {}
76
76
er := & execResponse {
77
77
Data : * dd ,
@@ -90,7 +90,7 @@ func postTestQueryNotExecuting(_ context.Context, _ *snowflakeRestful, _ *url.UR
90
90
}, nil
91
91
}
92
92
93
- func postTestRenew (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
93
+ func postTestRenew (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
94
94
dd := & execResponseData {}
95
95
er := & execResponse {
96
96
Data : * dd ,
@@ -110,7 +110,7 @@ func postTestRenew(_ context.Context, _ *snowflakeRestful, _ *url.URL, _ map[str
110
110
}, nil
111
111
}
112
112
113
- func postAuthTestAfterRenew (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration , _ bool ) (* http.Response , error ) {
113
+ func postAuthTestAfterRenew (_ context.Context , _ * http.Client , _ * url.URL , _ map [string ]string , _ bodyCreatorType , _ time.Duration ) (* http.Response , error ) {
114
114
dd := & execResponseData {}
115
115
er := & execResponse {
116
116
Data : * dd ,
@@ -130,7 +130,7 @@ func postAuthTestAfterRenew(_ context.Context, _ *http.Client, _ *url.URL, _ map
130
130
}, nil
131
131
}
132
132
133
- func postTestAfterRenew (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
133
+ func postTestAfterRenew (_ context.Context , _ * snowflakeRestful , _ * url.URL , _ map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
134
134
dd := & execResponseData {}
135
135
er := & execResponse {
136
136
Data : * dd ,
@@ -157,7 +157,7 @@ func cancelTestRetry(ctx context.Context, sr *snowflakeRestful, requestID UUID,
157
157
if err != nil {
158
158
return err
159
159
}
160
- resp , err := sr .FuncPost (ctx , sr , & u , getHeaders (), reqByte , timeout , false , defaultTimeProvider , nil )
160
+ resp , err := sr .FuncPost (ctx , sr , & u , getHeaders (), reqByte , timeout , defaultTimeProvider , nil )
161
161
if err != nil {
162
162
return err
163
163
}
@@ -462,7 +462,7 @@ func TestUnitRenewRestfulSession(t *testing.T) {
462
462
accessor := getSimpleTokenAccessor ()
463
463
oldToken , oldMasterToken , oldSessionID := "oldtoken" , "oldmaster" , int64 (100 )
464
464
newToken , newMasterToken , newSessionID := "newtoken" , "newmaster" , int64 (200 )
465
- postTestSuccessWithNewTokens := func (_ context.Context , _ * snowflakeRestful , _ * url.URL , headers map [string ]string , _ []byte , _ time.Duration , _ bool , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
465
+ postTestSuccessWithNewTokens := func (_ context.Context , _ * snowflakeRestful , _ * url.URL , headers map [string ]string , _ []byte , _ time.Duration , _ currentTimeProvider , _ * Config ) (* http.Response , error ) {
466
466
if headers [headerAuthorizationKey ] != fmt .Sprintf (headerSnowflakeToken , oldMasterToken ) {
467
467
t .Fatalf ("authorization key doesn't match, %v vs %v" , headers [headerAuthorizationKey ], fmt .Sprintf (headerSnowflakeToken , oldMasterToken ))
468
468
}
0 commit comments