@@ -9,7 +9,7 @@ import { getRunnerLogger } from "./logging";
99import { createFeatures , setupTests } from "./testing-utils" ;
1010import { UploadResult } from "./upload-lib" ;
1111import * as uploadLib from "./upload-lib" ;
12- import { uploadSarif } from "./upload-sarif" ;
12+ import { processAndUploadSarif } from "./upload-sarif" ;
1313import * as util from "./util" ;
1414
1515setupTests ( test ) ;
@@ -39,7 +39,7 @@ function mockPostProcessSarifFiles() {
3939 return postProcessSarifFiles ;
4040}
4141
42- const uploadSarifMacro = test . macro ( {
42+ const processAndUploadSarifMacro = test . macro ( {
4343 exec : async (
4444 t : ExecutionContext < unknown > ,
4545 sarifFiles : string [ ] ,
@@ -71,7 +71,7 @@ const uploadSarifMacro = test.macro({
7171 fs . writeFileSync ( sarifFile , "" ) ;
7272 }
7373
74- const actual = await uploadSarif (
74+ const actual = await processAndUploadSarif (
7575 logger ,
7676 features ,
7777 "always" ,
@@ -116,12 +116,12 @@ const uploadSarifMacro = test.macro({
116116 }
117117 } ) ;
118118 } ,
119- title : ( providedTitle = "" ) => `uploadSarif - ${ providedTitle } ` ,
119+ title : ( providedTitle = "" ) => `processAndUploadSarif - ${ providedTitle } ` ,
120120} ) ;
121121
122122test (
123123 "SARIF file" ,
124- uploadSarifMacro ,
124+ processAndUploadSarifMacro ,
125125 [ "test.sarif" ] ,
126126 ( tempDir ) => path . join ( tempDir , "test.sarif" ) ,
127127 {
@@ -136,7 +136,7 @@ test(
136136
137137test (
138138 "JSON file" ,
139- uploadSarifMacro ,
139+ processAndUploadSarifMacro ,
140140 [ "test.json" ] ,
141141 ( tempDir ) => path . join ( tempDir , "test.json" ) ,
142142 {
@@ -151,7 +151,7 @@ test(
151151
152152test (
153153 "Code Scanning files" ,
154- uploadSarifMacro ,
154+ processAndUploadSarifMacro ,
155155 [ "test.json" , "test.sarif" ] ,
156156 undefined ,
157157 {
@@ -167,7 +167,7 @@ test(
167167
168168test (
169169 "Code Quality file" ,
170- uploadSarifMacro ,
170+ processAndUploadSarifMacro ,
171171 [ "test.quality.sarif" ] ,
172172 ( tempDir ) => path . join ( tempDir , "test.quality.sarif" ) ,
173173 {
@@ -182,7 +182,7 @@ test(
182182
183183test (
184184 "Mixed files" ,
185- uploadSarifMacro ,
185+ processAndUploadSarifMacro ,
186186 [ "test.sarif" , "test.quality.sarif" ] ,
187187 undefined ,
188188 {
@@ -203,7 +203,7 @@ test(
203203 } ,
204204) ;
205205
206- test ( "uploadSarif doesn't upload if upload is disabled" , async ( t ) => {
206+ test ( "processAndUploadSarif doesn't upload if upload is disabled" , async ( t ) => {
207207 await util . withTmpDir ( async ( tempDir ) => {
208208 const logger = getRunnerLogger ( true ) ;
209209 const features = createFeatures ( [ ] ) ;
@@ -216,15 +216,15 @@ test("uploadSarif doesn't upload if upload is disabled", async (t) => {
216216 fs . writeFileSync ( toFullPath ( "test.sarif" ) , "" ) ;
217217 fs . writeFileSync ( toFullPath ( "test.quality.sarif" ) , "" ) ;
218218
219- const actual = await uploadSarif ( logger , features , "never" , "" , tempDir ) ;
219+ const actual = await processAndUploadSarif ( logger , features , "never" , "" , tempDir ) ;
220220
221221 t . truthy ( actual ) ;
222222 t . assert ( postProcessSarifFiles . calledTwice ) ;
223223 t . assert ( uploadProcessedFiles . notCalled ) ;
224224 } ) ;
225225} ) ;
226226
227- test ( "uploadSarif writes processed SARIF files if output directory is provided" , async ( t ) => {
227+ test ( "processAndUploadSarif writes processed SARIF files if output directory is provided" , async ( t ) => {
228228 await util . withTmpDir ( async ( tempDir ) => {
229229 const logger = getRunnerLogger ( true ) ;
230230 const features = createFeatures ( [ ] ) ;
@@ -237,7 +237,7 @@ test("uploadSarif writes processed SARIF files if output directory is provided",
237237 fs . writeFileSync ( toFullPath ( "test.quality.sarif" ) , "" ) ;
238238
239239 const processedOutPath = path . join ( tempDir , "processed" ) ;
240- const actual = await uploadSarif (
240+ const actual = await processAndUploadSarif (
241241 logger ,
242242 features ,
243243 "never" ,
0 commit comments