File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
integration_test/functions/src Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -72,5 +72,9 @@ export const databaseTests: any = functions.database
7272 expectEq ( ( context as any ) . action , undefined )
7373 )
7474
75+ . it ( 'should have admin authType' , ( change , context ) => {
76+ expectEq ( context . authType , 'ADMIN' ) ;
77+ } )
78+
7579 . run ( ctx . params [ testIdFieldName ] , ch , ctx ) ;
7680 } ) ;
Original file line number Diff line number Diff line change @@ -236,14 +236,10 @@ export function makeCloudFunction<EventData>({
236236 let cloudFunctionNewSignature : any = ( data : any , context : any ) => {
237237 if ( legacyEventType && context . eventType === legacyEventType ) {
238238 // v1beta1 event flow has different format for context, transform them to new format.
239- context = {
240- eventId : context . eventId ,
241- timestamp : context . timestamp ,
242- eventType : provider + '.' + eventType ,
243- resource : {
244- service : service ,
245- name : context . resource ,
246- } ,
239+ context . eventType = provider + '.' + eventType ;
240+ context . resource = {
241+ service : service ,
242+ name : context . resource ,
247243 } ;
248244 }
249245
You can’t perform that action at this time.
0 commit comments