diff --git a/test/e2e/agent/config_test.go b/test/e2e/agent/config_test.go index 125452e64f..d88fe4d72a 100644 --- a/test/e2e/agent/config_test.go +++ b/test/e2e/agent/config_test.go @@ -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() diff --git a/test/e2e/agent/recipes_test.go b/test/e2e/agent/recipes_test.go index a6de84b295..91a1736a77 100644 --- a/test/e2e/agent/recipes_test.go +++ b/test/e2e/agent/recipes_test.go @@ -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 { @@ -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") @@ -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 { diff --git a/test/e2e/agent/tls_test.go b/test/e2e/agent/tls_test.go index c1bebbdc36..c1552ef686 100644 --- a/test/e2e/agent/tls_test.go +++ b/test/e2e/agent/tls_test.go @@ -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")) { diff --git a/test/e2e/agent/upgrade_test.go b/test/e2e/agent/upgrade_test.go index 4072543146..ee57c8d338 100644 --- a/test/e2e/agent/upgrade_test.go +++ b/test/e2e/agent/upgrade_test.go @@ -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" @@ -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).