Fix mship/admin/rpc tests and make sure rolling is actually set for worker_server

This commit is contained in:
Mustafa Gezen 2023-09-01 01:10:33 +02:00
parent d407f5515f
commit 105dcbce40
Signed by: mustafa
GPG Key ID: DCDF010D946438C1
2 changed files with 7 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import (
"github.com/testcontainers/testcontainers-go/wait"
base "go.resf.org/peridot/base/go"
"go.resf.org/peridot/tools/mothership/migrations"
"go.temporal.io/sdk/client"
"google.golang.org/grpc/metadata"
"os"
"testing"
@ -32,6 +33,10 @@ var (
userInfo base.UserInfo
)
type fakeTemporalClient struct {
client.Client
}
func TestMain(m *testing.M) {
// Create temporary file
dir, err := os.MkdirTemp("", "test-db-*")
@ -80,7 +85,7 @@ func TestMain(m *testing.M) {
Provider: provider,
Group: "",
}
s, err = NewServer(db, interceptorDetails)
s, err = NewServer(db, &fakeTemporalClient{}, interceptorDetails)
if err != nil {
panic(err)
}

View File

@ -35,5 +35,6 @@ func New(db *base.DB, storage storage.Storage, gpgKeys openpgp.EntityList, forge
storage: storage,
gpgKeys: gpgKeys,
forge: forge,
rolling: rolling,
}
}