Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[e2e] Remove disabling of Agent e2e tests because of 6331 #6611

Merged
merged 2 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/e2e/agent/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,13 @@ func TestMultipleOutputConfig(t *testing.T) {
}

func TestFleetMode(t *testing.T) {
v := version.MustParse(test.Ctx().ElasticStackVersion)

test.SkipUntilResolution(t, 6331)
// https://github.com/elastic/cloud-on-k8s/issues/6331
if v.LT(version.MinFor(8, 7, 0)) && v.GE(version.MinFor(8, 6, 0)) {
t.SkipNow()
}

v := version.MustParse(test.Ctx().ElasticStackVersion)
// installation of policies and integrations through Kibana file based configuration was broken between those versions:
if v.LT(version.MinFor(8, 1, 0)) && v.GTE(version.MinFor(8, 0, 0)) {
t.SkipNow()
Expand Down
18 changes: 15 additions & 3 deletions test/e2e/agent/recipes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ func TestMultiOutputRecipe(t *testing.T) {
}

func TestFleetKubernetesIntegrationRecipe(t *testing.T) {
v := version.MustParse(test.Ctx().ElasticStackVersion)

test.SkipUntilResolution(t, 6331)
// https://github.com/elastic/cloud-on-k8s/issues/6331
if v.LT(version.MinFor(8, 7, 0)) && v.GE(version.MinFor(8, 6, 0)) {
t.SkipNow()
}

customize := func(builder agent.Builder) agent.Builder {
if !builder.Agent.Spec.FleetServerEnabled {
Expand Down Expand Up @@ -133,8 +137,12 @@ func TestFleetKubernetesIntegrationRecipe(t *testing.T) {
}

func TestFleetCustomLogsIntegrationRecipe(t *testing.T) {
v := version.MustParse(test.Ctx().ElasticStackVersion)

test.SkipUntilResolution(t, 6331)
// https://github.com/elastic/cloud-on-k8s/issues/6331
if v.LT(version.MinFor(8, 7, 0)) && v.GE(version.MinFor(8, 6, 0)) {
t.SkipNow()
}

notLoggingPod := beat.NewPodBuilder("test")
loggingPod := beat.NewPodBuilder("test")
Expand Down Expand Up @@ -162,8 +170,12 @@ func TestFleetCustomLogsIntegrationRecipe(t *testing.T) {
}

func TestFleetAPMIntegrationRecipe(t *testing.T) {
v := version.MustParse(test.Ctx().ElasticStackVersion)

test.SkipUntilResolution(t, 6331)
// https://github.com/elastic/cloud-on-k8s/issues/6331
if v.LT(version.MinFor(8, 7, 0)) && v.GE(version.MinFor(8, 6, 0)) {
t.SkipNow()
}

customize := func(builder agent.Builder) agent.Builder {
if !builder.Agent.Spec.FleetServerEnabled {
Expand Down
8 changes: 5 additions & 3 deletions test/e2e/agent/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import (

// TestFleetAgentWithoutTLS tests a Fleet Server, and Elastic Agent with TLS disabled for the HTTP layer.
func TestFleetAgentWithoutTLS(t *testing.T) {

test.SkipUntilResolution(t, 6331)

v := version.MustParse(test.Ctx().ElasticStackVersion)

// https://github.com/elastic/cloud-on-k8s/issues/6331
if v.LT(version.MinFor(8, 7, 0)) && v.GE(version.MinFor(8, 6, 0)) {
t.SkipNow()
}

// Disabling TLS for Fleet isn't supported before 7.16, as Elasticsearch doesn't allow
// api keys to be enabled when TLS is disabled.
if v.LT(version.MustParse("7.16.0")) {
Expand Down
14 changes: 12 additions & 2 deletions test/e2e/agent/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package agent
import (
"testing"

"github.com/elastic/cloud-on-k8s/v2/pkg/controller/common/version"
"github.com/elastic/cloud-on-k8s/v2/test/e2e/test"
"github.com/elastic/cloud-on-k8s/v2/test/e2e/test/agent"
"github.com/elastic/cloud-on-k8s/v2/test/e2e/test/elasticsearch"
Expand All @@ -17,12 +18,21 @@ import (

func TestAgentVersionUpgradeToLatest8x(t *testing.T) {

test.SkipUntilResolution(t, 6331)

srcVersion, dstVersion := test.GetUpgradePathTo8x(test.Ctx().ElasticStackVersion)

test.SkipInvalidUpgrade(t, srcVersion, dstVersion)

sv := version.MustParse(srcVersion)
dv := version.MustParse(dstVersion)

// https://github.com/elastic/cloud-on-k8s/issues/6331
if sv.LT(version.MinFor(8, 7, 0)) && sv.GE(version.MinFor(8, 6, 0)) {
t.SkipNow()
}
if dv.LT(version.MinFor(8, 7, 0)) && dv.GE(version.MinFor(8, 6, 0)) {
t.SkipNow()
}

name := "test-agent-upgrade"
esBuilder := elasticsearch.NewBuilder(name).
WithVersion(srcVersion).
Expand Down