From e92ee839dc7902d93c8f92f383c40d3cd628e3f6 Mon Sep 17 00:00:00 2001 From: Jan Christoph Uhde Date: Thu, 22 Mar 2018 13:33:49 +0100 Subject: [PATCH] add test for resilient single --- tests/deployments_test.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/deployments_test.go b/tests/deployments_test.go index 3873049c7..4e0fe5e88 100644 --- a/tests/deployments_test.go +++ b/tests/deployments_test.go @@ -42,6 +42,14 @@ func TestDeploymentSingleRocksDB(t *testing.T) { deploymentSubTest(t, api.DeploymentModeSingle, api.StorageEngineRocksDB) } +func TestDeploymentResilientSingleMMFiles(t *testing.T) { + deploymentSubTest(t, api.DeploymentModeResilientSingle, api.StorageEngineMMFiles) +} + +func TestDeploymentResilientSingleRocksDB(t *testing.T) { + deploymentSubTest(t, api.DeploymentModeResilientSingle, api.StorageEngineRocksDB) +} + func TestDeploymentClusterMMFiles(t *testing.T) { deploymentSubTest(t, api.DeploymentModeCluster, api.StorageEngineMMFiles) } @@ -92,6 +100,30 @@ func deploymentSubTest(t *testing.T, mode api.DeploymentMode, engine api.Storage if err := waitUntilVersionUp(DBClient); err != nil { t.Fatalf("Single Server not running in time: %v", err) } + } else if deployment.Spec.Mode == api.DeploymentModeResilientSingle { + t.Log("##################################") + if err := waitUntilVersionUp(DBClient); err != nil { + t.Fatalf("Single Server not running in time: %v", err) + } + + //waitUntilResilientHealth + + members := deployment.Status.Members + //singels := members.Single + + //run api/version for all servers + + // TEST CODE BELOW + agents := members.Agents + if len(agents) == 0 { + t.Fatal("This setup requires agents to work!") + } + + t.Logf("agents len: %v", len(agents)) + for _, server := range agents { + t.Logf("Server: %v ", server) + } + t.Log("##################################") } else { t.Fatalf("DeploymentMode %v is not supported!", deployment.Spec.Mode) }