diff --git a/.drone.star b/.drone.star index cdb55be3ea..2c8de7e824 100644 --- a/.drone.star +++ b/.drone.star @@ -1163,6 +1163,7 @@ def e2eTestPipeline(ctx): }, "commands": [ "cd %s/tests/e2e" % dirs["web"], + "ocis backup consistency -p /var/lib/ocis/storage/users", ], } diff --git a/ocis/pkg/command/backup.go b/ocis/pkg/command/backup.go index 4f594579d4..af4b2f6670 100644 --- a/ocis/pkg/command/backup.go +++ b/ocis/pkg/command/backup.go @@ -1,11 +1,14 @@ package command import ( + "errors" "fmt" ocisbs "github.com/cs3org/reva/v2/pkg/storage/fs/ocis/blobstore" s3bs "github.com/cs3org/reva/v2/pkg/storage/fs/s3ng/blobstore" "github.com/owncloud/ocis/v2/ocis-pkg/config" + "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" + "github.com/owncloud/ocis/v2/ocis-pkg/config/parser" "github.com/owncloud/ocis/v2/ocis/pkg/backup" "github.com/owncloud/ocis/v2/ocis/pkg/register" "github.com/urfave/cli/v2" @@ -19,6 +22,9 @@ func BackupCommand(cfg *config.Config) *cli.Command { Subcommands: []*cli.Command{ ConsistencyCommand(cfg), }, + Before: func(c *cli.Context) error { + return configlog.ReturnError(parser.ParseConfig(cfg, false)) + }, Action: func(_ *cli.Context) error { fmt.Println("Read the docs") return nil @@ -42,6 +48,7 @@ func ConsistencyCommand(cfg *config.Config) *cli.Command { Name: "blobstore", Aliases: []string{"b"}, Usage: "the blobstore type. Can be (ocis, s3ng). Default ocis", + Value: "ocis", }, }, Action: func(c *cli.Context) error { @@ -67,6 +74,8 @@ func ConsistencyCommand(cfg *config.Config) *cli.Command { ) case "ocis": bs, err = ocisbs.New(basePath) + default: + err = errors.New("blobstore type not supported") } if err != nil { fmt.Println(err)