fix: app var store can be resumed (#546)

This commit is contained in:
shentongmartin
2025-08-04 20:19:36 +08:00
committed by GitHub
parent f80d4f757b
commit 72656e4fd1
5 changed files with 137 additions and 98 deletions

View File

@@ -655,11 +655,10 @@ func TestKnowledgeNodes(t *testing.T) {
mockKnowledgeOperator.EXPECT().Retrieve(gomock.Any(), gomock.Any()).Return(rResponse, nil)
mockGlobalAppVarStore := mockvar.NewMockStore(ctrl)
mockGlobalAppVarStore.EXPECT().Get(gomock.Any(), gomock.Any()).Return("v1", nil).AnyTimes()
mockGlobalAppVarStore.EXPECT().Set(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
variable.SetVariableHandler(&variable.Handler{
AppVarStore: mockGlobalAppVarStore,
})
variable.SetVariableHandler(&variable.Handler{AppVarStore: mockGlobalAppVarStore})
mockey.Mock(execute.GetAppVarStore).Return(&execute.AppVariables{Vars: map[string]any{}}).Build()
ctx := t.Context()
ctx = ctxcache.Init(ctx)