Skip to content

Commit

Permalink
[e2e] Remove disabling of Agent e2e tests because of 6331 (#6611)
Browse files Browse the repository at this point in the history
* Remove disabling of agent e2e tests because of 6331.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
  • Loading branch information
naemono authored Mar 29, 2023
1 parent 30603c3 commit 348d5a6
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
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

0 comments on commit 348d5a6

Please sign in to comment.