@@ -191,7 +191,7 @@ func Test_Compute_Logs(t *testing.T) {
191
191
Fetch : func (ctx context.Context , req * wasmpb.FetchRequest ) (* wasmpb.FetchResponse , error ) {
192
192
return nil , nil
193
193
},
194
- }, "" , NewSingleBinaryWasmBinaryStore (binary ))
194
+ }, "wf1 " , NewSingleBinaryWasmBinaryStore (binary ))
195
195
require .NoError (t , err )
196
196
197
197
m .Start ()
@@ -213,8 +213,21 @@ func Test_Compute_Logs(t *testing.T) {
213
213
_ , err = m .Run (ctx , req )
214
214
assert .Nil (t , err )
215
215
216
- require .Len (t , logs .AllUntimed (), 2 )
216
+ require .Len (t , logs .AllUntimed (), 4 )
217
217
expectedEntries := []Entry {
218
+ {
219
+ Log : zapcore.Entry {Level : zapcore .InfoLevel , Message : "loading module from binary" },
220
+ Fields : []zapcore.Field {
221
+ zap .String ("workflowID" , "wf1" ),
222
+ },
223
+ },
224
+ {
225
+ Log : zapcore.Entry {Level : zapcore .InfoLevel , Message : "finished loading module from binary" },
226
+ Fields : []zapcore.Field {
227
+ zap .String ("workflowID" , "wf1" ),
228
+ },
229
+ },
230
+
218
231
{
219
232
Log : zapcore.Entry {Level : zapcore .InfoLevel , Message : "building workflow..." },
220
233
Fields : []zapcore.Field {
@@ -550,9 +563,21 @@ func Test_Compute_Fetch(t *testing.T) {
550
563
_ , err = m .Run (ctx , req )
551
564
assert .NotNil (t , err )
552
565
assert .ErrorContains (t , err , assert .AnError .Error ())
553
- require .Len (t , logs .AllUntimed (), 1 )
566
+ require .Len (t , logs .AllUntimed (), 3 )
554
567
555
568
expectedEntries := []Entry {
569
+ {
570
+ Log : zapcore.Entry {Level : zapcore .InfoLevel , Message : "loading module from binary" },
571
+ Fields : []zapcore.Field {
572
+ zap .String ("workflowID" , "wf1" ),
573
+ },
574
+ },
575
+ {
576
+ Log : zapcore.Entry {Level : zapcore .InfoLevel , Message : "finished loading module from binary" },
577
+ Fields : []zapcore.Field {
578
+ zap .String ("workflowID" , "wf1" ),
579
+ },
580
+ },
556
581
{
557
582
Log : zapcore.Entry {Level : zapcore .ErrorLevel , Message : fmt .Sprintf ("error calling fetch: %s" , assert .AnError )},
558
583
},
0 commit comments