@@ -94,7 +94,7 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
94
94
server
95
95
. mock ( "GET" , format ! ( "/repos/{REPO}/{diff_end_point}" ) . as_str ( ) )
96
96
. match_header ( "Accept" , "application/vnd.github.diff" )
97
- . match_header ( "Authorization" , TOKEN )
97
+ . match_header ( "Authorization" , format ! ( "token { TOKEN}" ) . as_str ( ) )
98
98
. with_body_from_file ( format ! ( "{asset_path}patch.diff" ) )
99
99
. with_header ( REMAINING_RATE_LIMIT_HEADER , "50" )
100
100
. with_header ( RESET_RATE_LIMIT_HEADER , reset_timestamp. as_str ( ) )
@@ -109,7 +109,7 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
109
109
format ! ( "/repos/{REPO}/commits/{SHA}/comments" ) . as_str ( ) ,
110
110
)
111
111
. match_header ( "Accept" , "application/vnd.github.raw+json" )
112
- . match_header ( "Authorization" , TOKEN )
112
+ . match_header ( "Authorization" , format ! ( "token { TOKEN}" ) . as_str ( ) )
113
113
. match_body ( Matcher :: Any )
114
114
. match_query ( Matcher :: UrlEncoded ( "page" . to_string ( ) , "1" . to_string ( ) ) )
115
115
. with_body_from_file ( format ! ( "{asset_path}push_comments_{SHA}.json" ) )
@@ -134,7 +134,7 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
134
134
server
135
135
. mock ( "GET" , pr_endpoint. as_str ( ) )
136
136
. match_header ( "Accept" , "application/vnd.github.raw+json" )
137
- . match_header ( "Authorization" , TOKEN )
137
+ . match_header ( "Authorization" , format ! ( "token { TOKEN}" ) . as_str ( ) )
138
138
. match_body ( Matcher :: Any )
139
139
. match_query ( Matcher :: UrlEncoded ( "page" . to_string ( ) , pg. to_string ( ) ) )
140
140
. with_body_from_file ( format ! ( "{asset_path}pr_comments_pg{pg}.json" ) )
@@ -153,6 +153,7 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
153
153
server
154
154
. mock ( "DELETE" , comment_url. as_str ( ) )
155
155
. match_body ( Matcher :: Any )
156
+ . match_header ( "Authorization" , format ! ( "token {TOKEN}" ) . as_str ( ) )
156
157
. with_status ( if test_params. fail_dismissal { 403 } else { 200 } )
157
158
. with_header ( REMAINING_RATE_LIMIT_HEADER , "50" )
158
159
. with_header ( RESET_RATE_LIMIT_HEADER , reset_timestamp. as_str ( ) )
@@ -177,6 +178,7 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
177
178
server
178
179
. mock ( "PATCH" , comment_url. as_str ( ) )
179
180
. match_body ( new_comment_match. clone ( ) )
181
+ . match_header ( "Authorization" , format ! ( "token {TOKEN}" ) . as_str ( ) )
180
182
. with_status ( if test_params. fail_posting { 403 } else { 200 } )
181
183
. with_header ( REMAINING_RATE_LIMIT_HEADER , "50" )
182
184
. with_header ( RESET_RATE_LIMIT_HEADER , reset_timestamp. as_str ( ) )
@@ -200,6 +202,7 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
200
202
. as_str ( ) ,
201
203
)
202
204
. match_body ( new_comment_match)
205
+ . match_header ( "Authorization" , format ! ( "token {TOKEN}" ) . as_str ( ) )
203
206
. with_header ( REMAINING_RATE_LIMIT_HEADER , "50" )
204
207
. with_header ( RESET_RATE_LIMIT_HEADER , reset_timestamp. as_str ( ) )
205
208
. with_status ( if test_params. fail_posting { 403 } else { 200 } )
0 commit comments