mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
Fix: change the unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
This commit is contained in:
@@ -604,10 +604,13 @@ var _ = Describe("Test workflow service functions", func() {
|
||||
srv := workflowServiceImpl{
|
||||
Store: mongodbDriver,
|
||||
}
|
||||
Expect(srv.DeleteWorkflowByApp(context.TODO(), &model.Application{Name: "app-test"})).ToNot(HaveOccurred())
|
||||
list, err := mongodbDriver.List(context.TODO(), &model.WorkflowRecord{}, nil)
|
||||
Expect(srv.DeleteWorkflowByApp(context.TODO(), &model.Application{Name: "war-app"})).ToNot(HaveOccurred())
|
||||
wc, err := mongodbDriver.Count(context.TODO(), &model.Workflow{AppPrimaryKey: "war-app"}, nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(int(wc)).Should(Equal(0))
|
||||
|
||||
list, err := mongodbDriver.List(context.TODO(), &model.WorkflowRecord{AppPrimaryKey: "war-app"}, nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
fmt.Println(list)
|
||||
Expect(len(list)).Should(Equal(0))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user