Skip to content
Snippets Groups Projects
Commit 86bf5779 authored by Nick Thomas's avatar Nick Thomas
Browse files

Avoid conflicts between tests on the same ES cluster

parent 6057d2de
No related branches found
No related tags found
1 merge request!1Initial implementation of an elasticsearch indexer in Go
Pipeline #
Loading
Loading
@@ -67,7 +67,7 @@ func TestElasticClientIndexAndRetrieval(t *testing.T) {
t.SkipNow()
}
 
os.Setenv("RAILS_ENV", fmt.Sprintf("test-%d", time.Now().Unix()))
os.Setenv("RAILS_ENV", fmt.Sprintf("test-elastic-%d", time.Now().Unix()))
 
client, err := elastic.FromEnv(projectID)
assert.NoError(t, err)
Loading
Loading
Loading
Loading
@@ -48,7 +48,7 @@ func checkDeps(t *testing.T) {
}
 
func buildIndex(t *testing.T) (*elastic.Client, func()) {
railsEnv := fmt.Sprintf("test-%d", time.Now().Unix())
railsEnv := fmt.Sprintf("test-integration-%d", time.Now().Unix())
os.Setenv("RAILS_ENV", railsEnv)
 
client, err := elastic.FromEnv(projectID)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment