From 9d848d24059cbec90fa1bbd804a2325484a546ac Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Mon, 21 Jun 2021 10:03:16 +0200 Subject: [PATCH] Reduce chunks storage usage in integration tests (https://github.com/cortexproject/cortex/pull/4296) * Reduce chunks storage usage in integration tests Signed-off-by: Marco Pracucci * Fixed userID in integration tests Signed-off-by: Marco Pracucci * Deleted unused code Signed-off-by: Marco Pracucci * Fixed 'make doc' Signed-off-by: Marco Pracucci --- db/db.go | 57 -------------------------------------------------------- 1 file changed, 57 deletions(-) diff --git a/db/db.go b/db/db.go index fadd4b4..fe6de79 100644 --- a/db/db.go +++ b/db/db.go @@ -2,13 +2,8 @@ package e2edb import ( "fmt" - "net/url" "strings" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/dynamodb" - awscommon "github.com/weaveworks/common/aws" - "github.com/cortexproject/cortex/integration/e2e" "github.com/cortexproject/cortex/integration/e2e/images" ) @@ -70,26 +65,6 @@ func NewETCD() *e2e.HTTPService { ) } -func NewDynamoClient(endpoint string) (*dynamodb.DynamoDB, error) { - dynamoURL, err := url.Parse(endpoint) - if err != nil { - return nil, err - } - - dynamoConfig, err := awscommon.ConfigFromURL(dynamoURL) - if err != nil { - return nil, err - } - - dynamoConfig = dynamoConfig.WithMaxRetries(0) - dynamoSession, err := session.NewSession(dynamoConfig) - if err != nil { - return nil, err - } - - return dynamodb.New(dynamoSession), nil -} - func NewDynamoDB() *e2e.HTTPService { return e2e.NewHTTPService( "dynamodb", @@ -100,35 +75,3 @@ func NewDynamoDB() *e2e.HTTPService { 8000, ) } - -// while using Bigtable emulator as index store make sure you set BIGTABLE_EMULATOR_HOST environment variable to host:9035 for all the services which access stores -func NewBigtable() *e2e.HTTPService { - return e2e.NewHTTPService( - "bigtable", - images.BigtableEmulator, - nil, - nil, - 9035, - ) -} - -func NewCassandra() *e2e.HTTPService { - return e2e.NewHTTPService( - "cassandra", - images.Cassandra, - nil, - // readiness probe inspired from https://github.com/kubernetes/examples/blob/b86c9d50be45eaf5ce74dee7159ce38b0e149d38/cassandra/image/files/ready-probe.sh - e2e.NewCmdReadinessProbe(e2e.NewCommand("bash", "-c", "nodetool status | grep UN")), - 9042, - ) -} - -func NewSwiftStorage() *e2e.HTTPService { - return e2e.NewHTTPService( - "swift", - images.SwiftEmulator, - nil, - e2e.NewHTTPReadinessProbe(8080, "/", 404, 404), - 8080, - ) -}