func (suite *ElasticSearchIndexTestSuite) TestEsIndexCleaner() {
	suite.runIndexCleaner("", []int{0})
}
TestIndexCleaner tests whether index has been removed. It uses indices without prefix.
Jaeger index cleaner < 1.26 used the date from index name. However, this has changed in version 1.26
to use the real creation date from index metadata. There is no way to create index with
explicitly set creation date, hence the only functionality that can be tested here is to remove all indices.
package e2e
import (
	"context"
	"fmt"
	"regexp"
	"sort"
	"strings"
	"testing"
	"time"
	"github.com/opentracing/opentracing-go"
	framework "github.com/operator-framework/operator-sdk/pkg/test"
	"github.com/sirupsen/logrus"
	"github.com/stretchr/testify/require"
	"github.com/stretchr/testify/suite"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1"
)
type ElasticSearchIndexTestSuite struct {
	suite.Suite
	esIndexCleanerHistoryDays int     
	esNamespace               string  
}
const ElasticSearchIndexDateLayout = "2006-01-02"  
type esIndexData struct {
	IndexName string     
	Type      string     
	Prefix    string     
	Date      time.Time  
}
func TestElasticSearchIndexSuite(t *testing.T) {
	indexSuite := new(ElasticSearchIndexTestSuite)
	indexSuite.esIndexCleanerHistoryDays = 45
	suite.Run(t, indexSuite)
}
func (suite *ElasticSearchIndexTestSuite) SetupSuite() {
	t = suite.T()
	var err error
	ctx, err = prepare(t)
	if err != nil {
		if ctx != nil {
			ctx.Cleanup()
		}
		require.FailNow(t, "Failed in prepare")
	}
	fw = framework.Global
	namespace = ctx.GetID()
	require.NotNil(t, namespace, "GetID failed")
	addToFrameworkSchemeForSmokeTests(t)
}
func (suite *ElasticSearchIndexTestSuite) TearDownSuite() {
	handleSuiteTearDown()
}
func (suite *ElasticSearchIndexTestSuite) SetupTest() {
	t = suite.T()
	if skipESExternal {
		suite.esNamespace = namespace
	} else {
		suite.esNamespace = storageNamespace
	}
	if !skipESExternal {
		DeleteEsIndices(suite.esNamespace)
	}
}
func (suite *ElasticSearchIndexTestSuite) AfterTest(_, _ string) {
	handleTestFailure()
}