@@ -3,47 +3,47 @@ import * as functions from "firebase-functions";
33import { REGION } from "../region" ;
44import { sanitizeData } from "../utils" ;
55
6- export const storageOnDeleteTests : any = functions
7- . runWith ( {
8- timeoutSeconds : 540 ,
9- } )
10- . region ( REGION )
11- . storage . bucket ( )
12- . object ( )
13- . onDelete ( async ( object , context ) => {
14- const testId = object . name ?. split ( "." ) [ 0 ] ;
15- if ( ! testId ) {
16- functions . logger . error ( "TestId not found for storage object delete" ) ;
17- return ;
18- }
19-
20- await admin
21- . firestore ( )
22- . collection ( "storageOnDeleteTests" )
23- . doc ( testId )
24- . set ( sanitizeData ( context ) ) ;
25- } ) ;
6+ // export const storageOnDeleteTests: any = functions
7+ // .runWith({
8+ // timeoutSeconds: 540,
9+ // })
10+ // .region(REGION)
11+ // .storage.bucket()
12+ // .object()
13+ // .onDelete(async (object, context) => {
14+ // const testId = object.name?.split(".")[0];
15+ // if (!testId) {
16+ // functions.logger.error("TestId not found for storage object delete");
17+ // return;
18+ // }
19+ //
20+ // await admin
21+ // .firestore()
22+ // .collection("storageOnDeleteTests")
23+ // .doc(testId)
24+ // .set(sanitizeData(context));
25+ // });
2626
27- export const storageOnFinalizeTests : any = functions
28- . runWith ( {
29- timeoutSeconds : 540 ,
30- } )
31- . region ( REGION )
32- . storage . bucket ( )
33- . object ( )
34- . onFinalize ( async ( object , context ) => {
35- const testId = object . name ?. split ( "." ) [ 0 ] ;
36- if ( ! testId ) {
37- functions . logger . error ( "TestId not found for storage object finalize" ) ;
38- return ;
39- }
40-
41- await admin
42- . firestore ( )
43- . collection ( "storageOnFinalizeTests" )
44- . doc ( testId )
45- . set ( sanitizeData ( context ) ) ;
46- } ) ;
27+ // export const storageOnFinalizeTests: any = functions
28+ // .runWith({
29+ // timeoutSeconds: 540,
30+ // })
31+ // .region(REGION)
32+ // .storage.bucket()
33+ // .object()
34+ // .onFinalize(async (object, context) => {
35+ // const testId = object.name?.split(".")[0];
36+ // if (!testId) {
37+ // functions.logger.error("TestId not found for storage object finalize");
38+ // return;
39+ // }
40+ //
41+ // await admin
42+ // .firestore()
43+ // .collection("storageOnFinalizeTests")
44+ // .doc(testId)
45+ // .set(sanitizeData(context));
46+ // });
4747
4848export const storageOnMetadataUpdateTests : any = functions
4949 . runWith ( {
0 commit comments