mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-07 07:42:45 +01:00
Add test for jobs (#34)
This commit is contained in:
@@ -144,7 +144,7 @@ func DB(t *testing.T) (context.Context, *catalyst.Config, *bus.Bus, *index.Index
|
||||
return nil, nil, nil, nil, nil, nil, nil, err
|
||||
}
|
||||
|
||||
_, err = db.JobCreate(ctx, "99cd67131b48", &model.JobForm{
|
||||
_, err = db.JobCreate(ctx, "b81c2366-ea37-43d2-b61b-03afdc21d985", &model.JobForm{
|
||||
Automation: "hash.sha1",
|
||||
Payload: "test",
|
||||
Origin: nil,
|
||||
@@ -201,6 +201,7 @@ func Catalyst(t *testing.T) (context.Context, *catalyst.Config, *catalyst.Server
|
||||
t.Fatal(err)
|
||||
}
|
||||
config.DB.Name = cleanName(t)
|
||||
config.IndexPath = cleanName(t) + ".bleve"
|
||||
|
||||
c, err := catalyst.New(&hooks.Hooks{
|
||||
DatabaseAfterConnectFuncs: []func(ctx context.Context, client driver.Client, name string){Clear},
|
||||
|
||||
Reference in New Issue
Block a user