Skip to content

Commit

Permalink
Flip Logic
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <[email protected]>
  • Loading branch information
mahadzaryab1 committed Nov 3, 2024
1 parent 847d01e commit 8c15859
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugin/storage/integration/elasticsearch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ func (*ESStorageIntegration) initializeESFactory(t *testing.T, allTagsAsFields b
v, command := config.Viperize(f.AddFlags)
var args []string
if isArchive {
args = []string{
"--es-archive.enabled=true",
fmt.Sprintf("--es-archive.tags-as-fields.all=%v", allTagsAsFields),
fmt.Sprintf("--es-archive.index-prefix=%v", indexPrefix),
}
} else {
args = []string{
fmt.Sprintf("--es.num-shards=%v", 5),
fmt.Sprintf("--es.num-replicas=%v", 1),
Expand All @@ -114,12 +120,6 @@ func (*ESStorageIntegration) initializeESFactory(t *testing.T, allTagsAsFields b
fmt.Sprintf("--es.bulk.actions=%v", 1),
fmt.Sprintf("--es.bulk.flush-interval=%v", time.Nanosecond),
}
} else {
args = []string{
"--es-archive.enabled=true",
fmt.Sprintf("--es-archive.tags-as-fields.all=%v", allTagsAsFields),
fmt.Sprintf("--es-archive.index-prefix=%v", indexPrefix),
}
}
require.NoError(t, command.ParseFlags(args))
f.InitFromViper(v, logger)
Expand Down

0 comments on commit 8c15859

Please sign in to comment.