Fix unittest for 31st day of month of ES index
@@ -19,8 +19,9 @@ func TestGetEsIndexNoTimeLast24h(t *testing.T) {
today := todayTime.Format("2006.01.02")
if todayTime.Day() == 31 {
+ today = todayTime.Format("2006.01.")
//if it's the 31st, shave off the 1 and make it 3*, which will be the 30th and 31st
- assert.Equal(t, sum+"-3*", index)
+ assert.Equal(t, sum+"-"+today+"3*", index)
} else {
yesterday := todayTime.Add(-24 * time.Hour).Format("2006.01.02")
assert.Equal(t, sum+"-"+yesterday+"*,"+sum+"-"+today+"*", index)
