Skip to content

Commit

Permalink
Fix SchemaDir for internal server integration test (cadence-workflow#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminc authored Sep 28, 2018
1 parent b91d4c0 commit 6b5af52
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions common/persistence/cassandra/cassandraPersistenceTest.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,16 @@ func (s *TestCluster) SetupTestDatabase(options *persistencetests.TestBaseOption

s.CreateSession(options)
s.CreateDatabase(1, options.DropDatabase)
cadencePackageDir, err := getCadencePackageDir()
if err != nil {
log.Fatal(err)
schemaDir := options.SchemaDir + "/"

if !strings.HasPrefix(schemaDir, "/") && !strings.HasPrefix(schemaDir, "../") {
cadencePackageDir, err := getCadencePackageDir()
if err != nil {
log.Fatal(err)
}
schemaDir = cadencePackageDir + schemaDir
}
schemaDir := cadencePackageDir + options.SchemaDir + "/"

s.LoadSchema([]string{"schema.cql"}, schemaDir)
s.LoadVisibilitySchema([]string{"schema.cql"}, schemaDir)
}
Expand Down

0 comments on commit 6b5af52

Please sign in to comment.