Skip to content

Commit 28918ab

Browse files
committed
re-enable rc e2e
1 parent a408715 commit 28918ab

11 files changed

+64
-443
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ integration-tests-v2: $(ENVTEST) ## Run tests with reconciler V2
212212
e2e-tests: manifests $(KUSTOMIZE) ## Run E2E tests and destroy environment stacks after tests complete. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests`.
213213
cd test/e2e && go get github.com/DataDog/datadog-agent/test/new-e2e@9ebd4d1cebbe1c9141e3a6b54176fdea8a79dd91
214214
cd $(ROOT)
215-
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e ./... -run TestAWSKindSuite -tags=!e2e -count=1 -v -timeout=0s -coverprofile cover_e2e.out
215+
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e ./... -count=1 -v -timeout=0s -coverprofile cover_e2e.out
216216

217217
.PHONY: e2e-tests-keep-stacks
218218
e2e-tests-keep-stacks: manifests $(KUSTOMIZE) ## Run E2E tests and keep environment stacks running. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests-keep-stacks`.

test/e2e/common.go

+5-35
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2016-present Datadog, Inc.
55

6-
//go:build e2e
7-
// +build e2e
8-
96
package e2e
107

118
import (
12-
"encoding/json"
139
"fmt"
1410
"os"
1511
"path/filepath"
16-
"regexp"
1712
"testing"
1813
"time"
1914

@@ -56,24 +51,19 @@ alias kl="kubectl logs"
5651
alias kx="kubectl exec"
5752
' >> /home/ubuntu/.bashrc
5853
`
59-
defaultMgrImageName = "gcr.io/datadoghq/operator"
60-
defaultMgrImgTag = "latest"
61-
defaultMgrFileName = "e2e-manager.yaml"
62-
nodeAgentSelector = "agent.datadoghq.com/component=agent"
63-
clusterAgentSelector = "agent.datadoghq.com/component=cluster-agent"
64-
clusterCheckRunnerSelector = "agent.datadoghq.com/component=cluster-checks-runner"
54+
defaultMgrImageName = "gcr.io/datadoghq/operator"
55+
defaultMgrImgTag = "latest"
56+
nodeAgentSelector = "agent.datadoghq.com/component=agent"
6557
)
6658

6759
var (
68-
namespaceName = "system"
60+
namespaceName = "e2e-operator"
6961
k8sVersion = getEnv("K8S_VERSION", "1.26")
7062
imgPullPassword = getEnv("IMAGE_PULL_PASSWORD", "")
7163

7264
kubeConfigPath string
73-
kubectlOptions *k8s.KubectlOptions
7465

75-
tmpDir string
76-
ddaMinimalPath = filepath.Join(manifestsPath, "datadog-agent-minimum.yaml")
66+
tmpDir string
7767
)
7868

7969
// getAbsPath Return absolute path for given path
@@ -211,23 +201,3 @@ func updateKustomization(kustomizeDirPath string, kustomizeResourcePaths []strin
211201

212202
return nil
213203
}
214-
215-
func parseCollectorJson(collectorOutput string) map[string]interface{} {
216-
var jsonString string
217-
var jsonObject map[string]interface{}
218-
219-
re := regexp.MustCompile(`(\{.*\})`)
220-
match := re.FindStringSubmatch(collectorOutput)
221-
if len(match) > 0 {
222-
jsonString = match[0]
223-
} else {
224-
return map[string]interface{}{}
225-
}
226-
227-
// Parse collector JSON
228-
err := json.Unmarshal([]byte(jsonString), &jsonObject)
229-
if err != nil {
230-
return map[string]interface{}{}
231-
}
232-
return jsonObject
233-
}

0 commit comments

Comments
 (0)