mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2026-01-07 23:03:09 +01:00
test: add upgrade tests (#1126)
This commit is contained in:
@@ -33,6 +33,7 @@ func App(dir string, test bool) (*pocketbase.PocketBase, error) {
|
||||
_ = app.RootCmd.ParseFlags(os.Args[1:])
|
||||
|
||||
app.RootCmd.AddCommand(fakeDataCmd(app))
|
||||
app.RootCmd.AddCommand(defaultDataCmd(app))
|
||||
|
||||
webhook.BindHooks(app)
|
||||
reaction.BindHooks(app, test)
|
||||
|
||||
@@ -23,3 +23,14 @@ func fakeDataCmd(app core.App) *cobra.Command {
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func defaultDataCmd(app core.App) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "default-data",
|
||||
RunE: func(_ *cobra.Command, _ []string) error {
|
||||
return fakedata.GenerateDefaultData(app)
|
||||
},
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user