Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve server_test and instructions on homebrew and dynamic config docs #4557

Merged
merged 7 commits into from
Oct 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
imp1
  • Loading branch information
longquanzheng committed Oct 14, 2021
commit 6cd05462c50c15a4e3c5cc05b5c85aa5e20ca3bc
11 changes: 6 additions & 5 deletions cmd/server/cadence/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ package cadence

import (
"log"
"os"
"testing"
"time"

Expand Down Expand Up @@ -54,11 +55,9 @@ func (s *ServerSuite) SetupTest() {

/*
TestServerStartup tests the startup logic for the binary. When this fails, you should be able to reproduce by running "cadence-server start"
If you need to run locally, make sure Cassandra is up and schema is installed(run `make install-schema`)
*/
func (s *ServerSuite) TestServerStartup() {
// If you want to test it locally, change it to false
runInBuildKite := true

env := "development"
zone := ""
rootDir := "../../../"
Expand All @@ -71,8 +70,10 @@ func (s *ServerSuite) TestServerStartup() {
if err != nil {
log.Fatal("Config file corrupted.", err)
}
// replace local host to docker network
if runInBuildKite {

if os.Getenv("CASSANDRA_HOST") == "cassandra" {
// replace local host to docker network
// this env variable value is set in pipeline.yml
ds := cfg.Persistence.DataStores[cfg.Persistence.DefaultStore]
ds.NoSQL.Hosts = "cassandra"
cfg.Persistence.DataStores[cfg.Persistence.DefaultStore] = ds
Expand Down