start metadata service as a step on the accounts pipeline

This commit is contained in:
A.Unger
2020-10-22 15:36:26 +02:00
parent 6cd48e711f
commit b1ae83c021
2 changed files with 24 additions and 23 deletions

View File

@@ -231,6 +231,9 @@ def testing(ctx, module):
}
]
if module == 'accounts':
steps = ocisMetadataStorage() + steps
if config['modules'][module] == 'frontend':
steps = frontend(module) + steps
@@ -253,6 +256,27 @@ def testing(ctx, module):
},
}
def ocisMetadataStorage():
return [
{
'name': 'ocis-metadata-storage',
'image': 'webhippie/golang:1.14',
'pull': 'always',
'detach': True,
'commands': [
'mkdir -p /srv/app/tmp/ocis/owncloud/data/',
'mkdir -p /srv/app/tmp/ocis/storage/users/',
'ocis/bin/ocis storage-metadata'
],
'volumes': [
{
'name': 'gopath',
'path': '/srv/app'
},
]
},
]
def uploadCoverage(ctx):
return {
'kind': 'pipeline',

View File

@@ -1,23 +0,0 @@
package test
import (
"context"
"flag"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/storage/pkg/command"
mcfg "github.com/owncloud/ocis/storage/pkg/config"
)
func init() {
go setupMetadataStorage()
}
func setupMetadataStorage() {
cfg := mcfg.New()
app := cli.App{
Name: "storage-metadata-for-tests",
Commands: []*cli.Command{command.StorageMetadata(cfg)},
}
_ = app.Command("storage-metadata").Run(cli.NewContext(&app, &flag.FlagSet{}, &cli.Context{Context: context.Background()}))
}