(tested) complete replace logrus with zerolog

* remove cobra dependency and split execs to mochi and e2e

* add log init synchronization
This commit is contained in:
Lawrence, Rendall
2022-05-02 03:13:58 +03:00
parent 4d646f7c09
commit c50a532181
36 changed files with 753 additions and 707 deletions

View File

@@ -44,14 +44,15 @@ jobs:
go-version: "^1.18"
- name: "Install and configure mochi"
run: |
go install --tags e2e ./cmd/mochi
go install ./cmd/mochi
go install ./cmd/mochi-e2e
cat ./dist/example_config.yaml
- name: "Run end-to-end tests"
run: |
mochi --config=./dist/example_config.yaml --debug &
mochi --config=./dist/example_config.yaml --logLevel debug --logPretty &
pid=$!
sleep 2
mochi e2e --debug
mochi-e2e
kill $pid
e2e-redis:
name: "E2E Redis Tests"
@@ -67,15 +68,16 @@ jobs:
go-version: "^1.18"
- name: "Install and configure mochi"
run: |
go install --tags e2e ./cmd/mochi
go install ./cmd/mochi
go install ./cmd/mochi-e2e
curl -LO https://github.com/jzelinskie/faq/releases/download/0.0.6/faq-linux-amd64
chmod +x faq-linux-amd64
./faq-linux-amd64 '.mochi.storage = {"config":{"gc_interval":"3m","peer_lifetime":"31m","prometheus_reporting_interval":"1s","connect_timeout":"15s","read_timeout":"15s","write_timeout":"15s"},"name":"redis"}' ./dist/example_config.yaml > ./dist/example_redis_config.yaml
cat ./dist/example_redis_config.yaml
- name: "Run end-to-end tests"
run: |
mochi --config=./dist/example_redis_config.yaml --debug &
mochi --config=./dist/example_redis_config.yaml --logLevel debug --logPretty &
pid=$!
sleep 2
mochi e2e --debug
mochi-e2e
kill $pid