Created
June 26, 2020 11:28
-
-
Save kevinearls/88f626ec42b5ebb8e97e38029bd479c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/e2e/elasticsearch_test.go b/test/e2e/elasticsearch_test.go | |
index 147e71f0..c8413d90 100644 | |
--- a/test/e2e/elasticsearch_test.go | |
+++ b/test/e2e/elasticsearch_test.go | |
@@ -23,6 +23,10 @@ import ( | |
"k8s.io/apimachinery/pkg/util/wait" | |
"k8s.io/client-go/tools/portforward" | |
+ eck "github.com/elastic/cloud-on-k8s/pkg/apis/elasticsearch/v1" | |
+ | |
+ commonv1 "github.com/elastic/cloud-on-k8s/pkg/apis/common/v1" | |
+ | |
v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1" | |
) | |
@@ -51,6 +55,53 @@ func (suite *ElasticSearchTestSuite) SetupSuite() { | |
if isOpenShift(t) { | |
esServerUrls = "http://elasticsearch." + storageNamespace + ".svc.cluster.local:9200" | |
} | |
+ | |
+} | |
+ | |
+// TODO move this | |
+func createEsInstance() { | |
+ // TODO where should this live? | |
+ | |
+ m := make(map[string]interface{}) | |
+ m["node.master"] = "true" | |
+ m["node.data"] = "true" | |
+ m["node.ingest"] = "true" | |
+ m["node.store.allow_mmap"] = "false" | |
+ | |
+ eatMe := &commonv1.Config{ | |
+ Data: m, | |
+ } | |
+ | |
+ node1 := eck.NodeSet{ | |
+ Name: "default", | |
+ Config: eatMe, | |
+ Count: 1, | |
+ } | |
+ nodes := []eck.NodeSet{node1} | |
+ | |
+ es1 := eck.Elasticsearch{ | |
+ TypeMeta: metav1.TypeMeta{ | |
+ Kind: "ElasticSearch", | |
+ APIVersion: "elasticsearch.k8s.elastic.co/v1", | |
+ }, | |
+ ObjectMeta: metav1.ObjectMeta{ | |
+ Name: "quickstart", | |
+ Namespace: namespace, | |
+ }, | |
+ Spec: eck.ElasticsearchSpec{ | |
+ Version: "7.8.0", // TODO pass this in | |
+ NodeSets: nodes, | |
+ }, | |
+ } | |
+ | |
+ err := fw.Client.Create(context.Background(), &es1, &framework.CleanupOptions{TestContext: ctx, Timeout: timeout, RetryInterval: retryInterval}) | |
+ if err == nil { | |
+ fmt.Printf("Got Error %v\n", err) | |
+ } | |
+ | |
+ fmt.Printf(">>>>>>>>>>>>>>> go check namespace %s\n", namespace) | |
+ time.Sleep(2 * time.Minute) | |
+ | |
} | |
func (suite *ElasticSearchTestSuite) TearDownSuite() { | |
@@ -70,6 +121,7 @@ func (suite *ElasticSearchTestSuite) AfterTest(suiteName, testName string) { | |
} | |
func (suite *ElasticSearchTestSuite) TestSparkDependenciesES() { | |
+ t.Skip() | |
storage := v1.JaegerStorageSpec{ | |
Type: "elasticsearch", | |
Options: v1.NewOptions(map[string]interface{}{ | |
@@ -81,6 +133,7 @@ func (suite *ElasticSearchTestSuite) TestSparkDependenciesES() { | |
} | |
func (suite *ElasticSearchTestSuite) TestSimpleProd() { | |
+ // createEsInstance() | |
err := WaitForStatefulset(t, fw.KubeClient, storageNamespace, "elasticsearch", retryInterval, timeout) | |
require.NoError(t, err, "Error waiting for elasticsearch") | |
@@ -104,6 +157,7 @@ func (suite *ElasticSearchTestSuite) TestSimpleProd() { | |
} | |
func (suite *ElasticSearchTestSuite) TestEsIndexCleanerWithIndexPrefix() { | |
+ t.Skip() | |
esIndexCleanerEnabled = false | |
esIndexPrefix := "prefix" | |
name := "test-es-index-prefixes" | |
@@ -137,6 +191,7 @@ func (suite *ElasticSearchTestSuite) TestEsIndexCleanerWithIndexPrefix() { | |
} | |
func (suite *ElasticSearchTestSuite) TestEsIndexCleaner() { | |
+ t.Skip() | |
esIndexCleanerEnabled = false | |
name := "test-es-index-cleaner" | |
j := getJaegerAllInOne(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment