Add index by week number to Elasticsearch output (#3490)

This commit is contained in:
Leandro Piccilli
2017-11-20 23:22:29 +01:00
committed by Daniel Nelson
parent db8e767f1f
commit 4d1bc620b2
3 changed files with 19 additions and 5 deletions

View File

@@ -120,6 +120,11 @@ func TestGetIndexName(t *testing.T) {
"indexname-%y-%m",
"indexname-14-12",
},
{
time.Date(2014, 12, 01, 23, 30, 00, 00, time.UTC),
"indexname-%Y-%V",
"indexname-2014-49",
},
}
for _, test := range tests {
indexName := e.GetIndexName(test.IndexName, test.EventTime)