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

Disable test agent with fleet mode in 8.0.1 #6957

Merged
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
12 changes: 0 additions & 12 deletions test/e2e/agent/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,6 @@ func TestMultipleOutputConfig(t *testing.T) {
}

func TestFleetMode(t *testing.T) {
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()
}

// 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()
}

name := "test-agent-fleet"

esBuilder := elasticsearch.NewBuilder(name).
Expand Down
19 changes: 0 additions & 19 deletions test/e2e/agent/recipes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ func TestMultiOutputRecipe(t *testing.T) {
}

func TestFleetKubernetesIntegrationRecipe(t *testing.T) {
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()
}

customize := func(builder agent.Builder) agent.Builder {
if !builder.Agent.Spec.FleetServerEnabled {
return builder
Expand Down Expand Up @@ -143,11 +136,6 @@ func TestFleetCustomLogsIntegrationRecipe(t *testing.T) {
t.Skip("Disabled since 8.8.0, refer to https://github.com/elastic/cloud-on-k8s/issues/5105")
}

// 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.Skip("Disabled for 8.6.x, refer to https://github.com/elastic/cloud-on-k8s/issues/6331")
}

notLoggingPod := beat.NewPodBuilder("test")
loggingPod := beat.NewPodBuilder("test")
loggingPod.Pod.Namespace = "default"
Expand All @@ -174,13 +162,6 @@ func TestFleetCustomLogsIntegrationRecipe(t *testing.T) {
}

func TestFleetAPMIntegrationRecipe(t *testing.T) {
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()
}

customize := func(builder agent.Builder) agent.Builder {
if !builder.Agent.Spec.FleetServerEnabled {
return builder
Expand Down
5 changes: 0 additions & 5 deletions test/e2e/agent/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ import (
func TestFleetAgentWithoutTLS(t *testing.T) {
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: 0 additions & 14 deletions test/e2e/agent/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,16 @@ 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"
"github.com/elastic/cloud-on-k8s/v2/test/e2e/test/kibana"
)

func TestAgentVersionUpgradeToLatest8x(t *testing.T) {

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
12 changes: 11 additions & 1 deletion test/e2e/test/agent/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,22 @@ type Builder struct {
}

func (b Builder) SkipTest() bool {
ver := version.MustParse(b.Agent.Spec.Version)
supportedVersions := version.SupportedAgentVersions

if b.Agent.Spec.FleetModeEnabled() {
supportedVersions = version.SupportedFleetModeAgentVersions

// Kibana bug "index conflict on install policy", https://github.com/elastic/kibana/issues/126611
if ver.GTE(version.MinFor(8, 0, 0)) && ver.LT(version.MinFor(8, 1, 0)) {
return true
}
// Elastic agent bug "deadlock on startup", https://github.com/elastic/cloud-on-k8s/issues/6331#issuecomment-1478320487
if ver.GE(version.MinFor(8, 6, 0)) && ver.LT(version.MinFor(8, 7, 0)) {
return true
}
}

ver := version.MustParse(b.Agent.Spec.Version)
return supportedVersions.WithinRange(ver) != nil
}

Expand Down