Skip to content

Commit

Permalink
Merge branch 'enable-ci' into 'master'
Browse files Browse the repository at this point in the history
Add gitlab CI config

See merge request powerdns/lightningstream!2
  • Loading branch information
konrad.wojas committed Nov 11, 2022
2 parents 97c32e9 + 5ef91a8 commit 3110fb9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
image: golang:1.19-buster

stages:
- test
- build

test:
stage: test
script:
- ./test.sh -race

build:
stage: build
script:
- ./build.sh

5 changes: 3 additions & 2 deletions syncer/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/PowerDNS/simpleblob"
"github.com/PowerDNS/simpleblob/backends/memory"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"powerdns.com/platform/lightningstream/config"
"powerdns.com/platform/lightningstream/config/logger"
Expand All @@ -21,7 +22,7 @@ import (

const testLMDBName = "default"
const testDBIName = "test"
const tick = 50 * time.Millisecond
const tick = 100 * time.Millisecond

func TestSyncer_Sync_startup(t *testing.T) {
t.Run("with-timestamped-schema", func(t *testing.T) {
Expand Down Expand Up @@ -156,7 +157,7 @@ func listInstanceSnapshots(st simpleblob.Interface, instance string) simpleblob.
func runSync(ctx context.Context, syncer *Syncer) {
err := syncer.Sync(ctx)
if err != nil && err != context.Canceled {
panic("Syncer A error: " + err.Error())
logrus.WithError(err).WithField("syncer", syncer.name).Error("Syncer Sync error")
}
}

Expand Down

0 comments on commit 3110fb9

Please sign in to comment.