From c8464436522859affc37fc2468643c06cfa92fba Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 09:38:39 +0700 Subject: [PATCH 01/12] Update golang to v1.11.4 --- .circleci/config.yml | 2 +- Dockerfile | 2 +- Dockerfile.tools | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 961d085f3..70ff39107 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ runOnMachine: &runOnMachine runOnDocker: &runOnDocker docker: - - image: circleci/golang:1.11 + - image: circleci/golang:1.11.4 jobs: "test": diff --git a/Dockerfile b/Dockerfile index 736708df8..0a823236c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.10.3-stretch AS build +FROM golang:1.11.4-stretch AS build WORKDIR src/github.com/mesg-foundation/core COPY . . ARG version diff --git a/Dockerfile.tools b/Dockerfile.tools index e43cd259c..a418e51ff 100644 --- a/Dockerfile.tools +++ b/Dockerfile.tools @@ -1,5 +1,5 @@ # base Go image version. -ARG go=1.11.0-stretch +ARG go=1.11.4-stretch FROM golang:$go From b2401d6f21b729cf99a132fd7f24daf9a9ba04e0 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 10:10:02 +0700 Subject: [PATCH 02/12] Fix script dev-core --- dev-core | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-core b/dev-core index cccea5a67..532098f24 100755 --- a/dev-core +++ b/dev-core @@ -2,7 +2,7 @@ set -e -DIR=${GOPATH:-$HOME/go} +DIR=`pwd` MESG_LOG_LEVEL=${MESG_LOG_LEVEL:-debug} VERSION=local LDFLAGS="-X 'github.com/mesg-foundation/core/version.Version=$VERSION'" @@ -38,7 +38,7 @@ fi # create a symlink for system services. rm -rf "$HOME/.mesg/systemservices" mkdir -p "$HOME/.mesg/" -ln -s "$DIR/src/github.com/mesg-foundation/core/systemservices/sources" "$HOME/.mesg/systemservices" +ln -s "$DIR/systemservices/sources" "$HOME/.mesg/systemservices" echo "build mesg/core image" if [[ ! $BINCACHED ]] || [[ ! $DOCKERCACHED ]]; then From e442a1bc77cfc7219b41e914ae68c4719387ae4f Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 10:10:12 +0700 Subject: [PATCH 03/12] Fix dockerfile --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a823236c..566dde2ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM golang:1.11.4-stretch AS build -WORKDIR src/github.com/mesg-foundation/core +WORKDIR /core +COPY go.mod go.sum ./ +RUN go mod download COPY . . ARG version RUN go build -o mesg-core \ @@ -12,5 +14,5 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* WORKDIR /app -COPY --from=build /go/src/github.com/mesg-foundation/core/mesg-core . +COPY --from=build /core/mesg-core . CMD ["./mesg-core"] From 808e09b3c397907d47b4a017f2bfffee14a68e33 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 10:25:55 +0700 Subject: [PATCH 04/12] Add all node_modules and bin folder in dockerignore --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 06a28c2e0..ec9b1c2be 100644 --- a/.dockerignore +++ b/.dockerignore @@ -10,7 +10,8 @@ mesg-dev .git **/*.test **/debug -node_modules +**/node_modules +bin/ # prevent go build cache to break inside Docker on changes to systemservices/sources. systemservices/sources \ No newline at end of file From 82d0295efe309665bffa808251d22cb07a4391fe Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 15:29:48 +0700 Subject: [PATCH 05/12] Only docker ignore ./bin/cli --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index ec9b1c2be..e32a6c3c8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,7 +11,7 @@ mesg-dev **/*.test **/debug **/node_modules -bin/ +bin/cli # prevent go build cache to break inside Docker on changes to systemservices/sources. systemservices/sources \ No newline at end of file From c22340897cb301f5f957816f02d066f62fc84d89 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 10:27:02 +0700 Subject: [PATCH 06/12] fix mesg-tools + rename core to project in dockefile --- Dockerfile | 4 ++-- Dockerfile.tools | 19 ++++++++++--------- mesg-tools | 2 +- scripts/build-proto.sh | 12 ++++-------- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 566dde2ee..9003d7c17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM golang:1.11.4-stretch AS build -WORKDIR /core +WORKDIR /project COPY go.mod go.sum ./ RUN go mod download COPY . . @@ -14,5 +14,5 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* WORKDIR /app -COPY --from=build /core/mesg-core . +COPY --from=build /project/mesg-core . CMD ["./mesg-core"] diff --git a/Dockerfile.tools b/Dockerfile.tools index a418e51ff..3b375a21a 100644 --- a/Dockerfile.tools +++ b/Dockerfile.tools @@ -3,6 +3,12 @@ ARG go=1.11.4-stretch FROM golang:$go +WORKDIR /project +COPY go.mod go.sum ./ +RUN go mod download + +VOLUME /project + # install some dependencies from apt-get. RUN apt-get update -y && \ apt-get install -y unzip && \ @@ -18,15 +24,10 @@ RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v$prot mv /tmp/protobuf/bin/protoc /usr/local/bin/protoc && \ rm -rf /tmp/* -# symlink project path to have a short version for cosmetics. -RUN ln -s /go/src/github.com/mesg-foundation/core /core -WORKDIR /core -VOLUME /core - -# cache vendor for faster builds while using go run commands. -# also needed to install script's dependencies into /go/bin. -ADD vendor/ vendor -RUN go install -i ./vendor/... +RUN go install github.com/go-bindata/go-bindata/go-bindata +RUN go install github.com/golang/protobuf/protoc-gen-go +RUN go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc +RUN go install github.com/vektra/mockery/.../ # verify that mesg-dev container is being used. ENV MESG_DEV true diff --git a/mesg-tools b/mesg-tools index 7b3ae3b9c..503484785 100755 --- a/mesg-tools +++ b/mesg-tools @@ -4,7 +4,7 @@ docker build -t mesg/tools:local -f Dockerfile.tools . # shortland of container run command. -run_in_container="docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`:/core mesg/tools:local" +run_in_container="docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`:/project mesg/tools:local" # run any command under dev container. $run_in_container $@ diff --git a/scripts/build-proto.sh b/scripts/build-proto.sh index 4cc6e210d..bce935c36 100755 --- a/scripts/build-proto.sh +++ b/scripts/build-proto.sh @@ -3,13 +3,9 @@ # make sure script is running inside mesg/tools container. source $(dirname $0)/require-mesg-tools.sh -cd $GOPATH/src - -PROJECT=github.com/mesg-foundation/core +PROJECT=/project GRPC=$PROJECT/protobuf -CORE=$(pwd)/$PROJECT -API_DOCS="--doc_out=$CORE/docs/api/ --doc_opt=$CORE/docs/api.template" -GRPC_PLUGIN="--go_out=plugins=grpc:./" +API_DOCS="--doc_out=$PROJECT/docs/api/ --doc_opt=$PROJECT/docs/api.template" -protoc $GRPC_PLUGIN $API_DOCS,core.md --proto_path=./ $GRPC/coreapi/api.proto -protoc $GRPC_PLUGIN $API_DOCS,service.md --proto_path=./ $GRPC/serviceapi/api.proto +protoc $GRPC_PLUGIN $API_DOCS,core.md --proto_path=$PROJECT $GRPC/coreapi/api.proto +protoc $GRPC_PLUGIN $API_DOCS,service.md --proto_path=$PROJECT $GRPC/serviceapi/api.proto From 798271295aa926442a7617be4e4bbcd69a80c39b Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 17:50:03 +0700 Subject: [PATCH 07/12] add comment --- scripts/build-mocks.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build-mocks.sh b/scripts/build-mocks.sh index 6327ad629..71b2b38e8 100755 --- a/scripts/build-mocks.sh +++ b/scripts/build-mocks.sh @@ -3,6 +3,8 @@ # make sure script is running inside mesg/tools container. source $(dirname $0)/require-mesg-tools.sh +# TODO: NEED TO FIX + # navigate to core repo. cd $GOPATH/src/github.com/mesg-foundation/core From bb583fdc1d2f582959146173b5d90ce6ae3ce6d6 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 17:54:28 +0700 Subject: [PATCH 08/12] add more stuff to ignore --- .dockerignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.dockerignore b/.dockerignore index e32a6c3c8..9e2f7774b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,6 +12,9 @@ mesg-dev **/debug **/node_modules bin/cli +docs/ +scripts/ +docker-images/ # prevent go build cache to break inside Docker on changes to systemservices/sources. systemservices/sources \ No newline at end of file From bce3397c3719fd133e229d24428d0e3db8a5cdeb Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 17:59:55 +0700 Subject: [PATCH 09/12] improve script dev-core --- dev-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-core b/dev-core index 532098f24..7e10f127c 100755 --- a/dev-core +++ b/dev-core @@ -2,7 +2,7 @@ set -e -DIR=`pwd` +DIR=$(pwd) MESG_LOG_LEVEL=${MESG_LOG_LEVEL:-debug} VERSION=local LDFLAGS="-X 'github.com/mesg-foundation/core/version.Version=$VERSION'" From a6157de6cd20800b3fe17894f28ad7c8ecc16ef2 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 18:16:04 +0700 Subject: [PATCH 10/12] Use exactly same first step between Dockerfile and Dockerfile.tools --- Dockerfile | 5 +++++ Dockerfile.tools | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9003d7c17..7b2c31295 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ +# base Go image version. FROM golang:1.11.4-stretch AS build + WORKDIR /project + +# install dependencies COPY go.mod go.sum ./ RUN go mod download + COPY . . ARG version RUN go build -o mesg-core \ diff --git a/Dockerfile.tools b/Dockerfile.tools index 3b375a21a..e995fa70f 100644 --- a/Dockerfile.tools +++ b/Dockerfile.tools @@ -1,9 +1,9 @@ # base Go image version. -ARG go=1.11.4-stretch - -FROM golang:$go +FROM golang:1.11.4-stretch WORKDIR /project + +# install dependencies COPY go.mod go.sum ./ RUN go mod download From ba3ab8b221e2c8615bc7b8b5e6d62571d0d1579d Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 18:16:16 +0700 Subject: [PATCH 11/12] Update version of mockery --- go.mod | 9 +++------ go.sum | 7 +++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 4472a4bef..96a3110d0 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/cnf/structhash v0.0.0-20180104161610-62a607eb0224 github.com/containerd/continuity v0.0.0-20180712174259-0377f7d76720 // indirect github.com/cpuguy83/go-md2man v1.0.8 // indirect - github.com/davecgh/go-spew v1.1.0 // indirect github.com/docker/distribution v0.0.0-20180720172123-0dae0957e5fe // indirect github.com/docker/docker v0.0.0-20180803200506-eeea12db7a65 github.com/docker/go-connections v0.0.0-20180212134524-7beb39f0b969 // indirect @@ -52,7 +51,6 @@ require ( github.com/opencontainers/runc v0.1.1 // indirect github.com/pelletier/go-buffruneio v0.0.0-20180119162133-e2f66f8164ca // indirect github.com/pkg/errors v0.8.0 - github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pseudomuto/protoc-gen-doc v1.1.0 github.com/pseudomuto/protokit v0.1.0 // indirect github.com/russross/blackfriday v1.5.1 // indirect @@ -62,11 +60,10 @@ require ( github.com/spf13/cobra v0.0.0-20171207074935-ccaecb155a21 github.com/spf13/pflag v0.0.0-20180601132542-3ebe029320b2 github.com/src-d/gcfg v1.3.0 // indirect - github.com/stretchr/objx v0.1.1 // indirect - github.com/stretchr/testify v1.2.2 + github.com/stretchr/testify v1.3.0 github.com/stvp/assert v0.0.0-20170616060220-4bc16443988b // indirect github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3 - github.com/vektra/mockery v0.0.0-20180815001236-ea265755d541 + github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 github.com/xanzy/ssh-agent v0.2.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect @@ -75,7 +72,7 @@ require ( golang.org/x/net v0.0.0-20180906233101-161cd47e91fd golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect - golang.org/x/tools v0.0.0-20181004163742-59602fdee893 // indirect + golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b // indirect google.golang.org/genproto v0.0.0-20180709204101-e92b11657268 // indirect google.golang.org/grpc v0.0.0-20180710012024-c491b25057c8 gopkg.in/AlecAivazis/survey.v1 v1.6.1 diff --git a/go.sum b/go.sum index 93325f640..48ecfdccc 100644 --- a/go.sum +++ b/go.sum @@ -22,6 +22,7 @@ github.com/cpuguy83/go-md2man v1.0.8 h1:DwoNytLphI8hzS2Af4D0dfaEaiSq2bN05mEm4R6v github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v0.0.0-20180720172123-0dae0957e5fe h1:ZRQNMB7Sw5jf9g/0imDbI+vTFNk4J7qBdtFI5/zf1kg= github.com/docker/distribution v0.0.0-20180720172123-0dae0957e5fe/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20180803200506-eeea12db7a65 h1:WeqSIzsb30/sarqEph9RS+6xw8rmRpCACwV8+cJ1Rkc= @@ -128,16 +129,20 @@ github.com/spf13/pflag v0.0.0-20180601132542-3ebe029320b2 h1:OAuq3yHhRwcm/kwCSAq github.com/spf13/pflag v0.0.0-20180601132542-3ebe029320b2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/src-d/gcfg v1.3.0 h1:2BEDr8r0I0b8h/fOqwtxCEiq2HJu8n2JGZJQFGXWLjg= github.com/src-d/gcfg v1.3.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stvp/assert v0.0.0-20170616060220-4bc16443988b h1:GlTM/aMVIwU3luIuSN2SIVRuTqGPt1P97YxAi514ulw= github.com/stvp/assert v0.0.0-20170616060220-4bc16443988b/go.mod h1:CC7OXV9IjEZRA+znA6/Kz5vbSwh69QioernOHeDCatU= github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3 h1:sAlSBRDl4psFR3ysKXRSE8ss6Mt90+ma1zRTroTNBJA= github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/vektra/mockery v0.0.0-20180815001236-ea265755d541 h1:Ou5sd/oSrXE5QqNlp85E1d1GFDquJ4Vsmc3Hqpr4IF8= github.com/vektra/mockery v0.0.0-20180815001236-ea265755d541/go.mod h1:3LHOhl7yhnq4Wov6IXX3laolKx4NiYRqPgER/wSC2TQ= +github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 h1:Xim2mBRFdXzXmKRO8DJg/FJtn/8Fj9NOEpO6+WuMPmk= +github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5/go.mod h1:ppEjwdhyy7Y31EnHRDm1JkChoC7LXIJ7Ex0VYLWtZtQ= github.com/xanzy/ssh-agent v0.2.0 h1:Adglfbi5p9Z0BmK2oKU9nTG+zKfniSfnaMYB+ULd+Ro= github.com/xanzy/ssh-agent v0.2.0/go.mod h1:0NyE30eGUDliuLEHJgYte/zncp2zdTStcOnWhgSqHD8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= @@ -161,6 +166,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuA golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20181004163742-59602fdee893 h1:rsE8bdRd+SQZ1eQSuWpO3bw7AmfVa+vsnxkZ9tcPzAA= golang.org/x/tools v0.0.0-20181004163742-59602fdee893/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/genproto v0.0.0-20180709204101-e92b11657268 h1:ZxmDkz4oA3H5lKSXr68Ziv+dzLc6g/eMFgC0dg8wNtU= google.golang.org/genproto v0.0.0-20180709204101-e92b11657268/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v0.0.0-20180710012024-c491b25057c8 h1:GQEf7UzpWu5cs276baekFHmem4nWmuAZe6pIAjjR+xY= From 94e58541ca3d6ac4baf1f2cd8c191c2fce8548f1 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Mon, 14 Jan 2019 18:17:17 +0700 Subject: [PATCH 12/12] Partially fix build-mocks --- scripts/build-mocks.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/build-mocks.sh b/scripts/build-mocks.sh index 71b2b38e8..2d33a9f9f 100755 --- a/scripts/build-mocks.sh +++ b/scripts/build-mocks.sh @@ -3,16 +3,12 @@ # make sure script is running inside mesg/tools container. source $(dirname $0)/require-mesg-tools.sh -# TODO: NEED TO FIX - -# navigate to core repo. -cd $GOPATH/src/github.com/mesg-foundation/core - # generate mocks for container package. mockery -name=Container -dir ./container -output ./container/mocks # generate mocks for docker.CommonAPIClient that used by container package. -mockery -name CommonAPIClient -dir ./vendor/github.com/docker/docker/client -output ./utils/docker/mocks +# TODO: to fix +# mockery -name CommonAPIClient -dir ./vendor/github.com/docker/docker/client -output ./utils/docker/mocks # generate mocks for database package. mockery -name=ServiceDB -dir ./database -output ./database/mocks