@@ -81,6 +81,7 @@ describe('WorkflowStatisticsService', () => {
81
81
test . each < WorkflowExecuteMode > ( [ 'cli' , 'error' , 'retry' , 'trigger' , 'webhook' , 'evaluation' ] ) (
82
82
'should upsert with root executions for execution mode %s' ,
83
83
async ( mode ) => {
84
+ mockDBCall ( ) ;
84
85
// Call the function with a production success result, ensure metrics hook gets called
85
86
const runData : IRun = {
86
87
finished : true ,
@@ -103,6 +104,7 @@ describe('WorkflowStatisticsService', () => {
103
104
test . each < WorkflowExecuteMode > ( [ 'manual' , 'integrated' , 'internal' ] ) (
104
105
'should upsert without root executions for execution mode %s' ,
105
106
async ( mode ) => {
107
+ mockDBCall ( ) ;
106
108
const runData : IRun = {
107
109
finished : true ,
108
110
status : 'success' ,
@@ -124,6 +126,7 @@ describe('WorkflowStatisticsService', () => {
124
126
test . each < ExecutionStatus > ( [ 'success' , 'crashed' , 'error' ] ) (
125
127
'should upsert with root executions for execution status %s' ,
126
128
async ( status ) => {
129
+ mockDBCall ( ) ;
127
130
const runData : IRun = {
128
131
finished : true ,
129
132
status,
@@ -145,6 +148,7 @@ describe('WorkflowStatisticsService', () => {
145
148
test . each < ExecutionStatus > ( [ 'canceled' , 'new' , 'running' , 'unknown' , 'waiting' ] ) (
146
149
'should upsert without root executions for execution status %s' ,
147
150
async ( status ) => {
151
+ mockDBCall ( ) ;
148
152
const runData : IRun = {
149
153
finished : true ,
150
154
status,
@@ -194,6 +198,7 @@ describe('WorkflowStatisticsService', () => {
194
198
} ) ;
195
199
196
200
test ( 'should only create metrics for production successes' , async ( ) => {
201
+ mockDBCall ( ) ;
197
202
// Call the function with a non production success result, ensure metrics hook is never called
198
203
const workflow = {
199
204
id : '1' ,
0 commit comments