mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-07 03:50:30 -05:00
feat(ci): test consistency command
Signed-off-by: jkoberg <jkoberg@owncloud.com> Co-authored-by: dragonchaser <crichter@owncloud.com>
This commit is contained in:
@@ -1163,6 +1163,7 @@ def e2eTestPipeline(ctx):
|
||||
},
|
||||
"commands": [
|
||||
"cd %s/tests/e2e" % dirs["web"],
|
||||
"ocis backup consistency -p /var/lib/ocis/storage/users",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user