From a87ec42695734e9f6129a7c05c0faf05ec3d12ce Mon Sep 17 00:00:00 2001 From: Marethyu <45374460+Pythyu@users.noreply.github.com> Date: Mon, 18 Dec 2023 13:06:14 +0100 Subject: [PATCH] Updates current tests with fakeintake loadbalancer's new default state (#21535) Updates current tests with fakeintake loadbalancer's new default state --- .gitlab-ci.yml | 2 +- test/new-e2e/examples/agentenv_metrics_test.go | 2 -- .../agent-shared-components/forwarder/nss_failover_test.go | 4 ++-- test/new-e2e/tests/agent-subcommands/diagnose_test.go | 3 +-- test/new-e2e/tests/agent-subcommands/flare/flare_nix_test.go | 3 +-- test/new-e2e/tests/agent-subcommands/flare/flare_win_test.go | 3 +-- test/new-e2e/tests/agent-subcommands/subcommands_test.go | 4 +--- test/new-e2e/tests/ndm/snmp/snmpTestEnv.go | 3 +-- test/new-e2e/tests/process/linux_test.go | 2 -- 9 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b42308704575..9313b5d4a6400 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -176,7 +176,7 @@ variables: # To use images from test-infra-definitions dev branches, set the SUFFIX variable to -dev # and check the job creating the image to make sure you have the right SHA prefix TEST_INFRA_DEFINITIONS_BUILDIMAGES_SUFFIX: "" - TEST_INFRA_DEFINITIONS_BUILDIMAGES: 281b2a324002 + TEST_INFRA_DEFINITIONS_BUILDIMAGES: 67d2009bcd81 DATADOG_AGENT_BUILDERS: v22276738-b36b132 DATADOG_AGENT_EMBEDDED_PATH: /opt/datadog-agent/embedded diff --git a/test/new-e2e/examples/agentenv_metrics_test.go b/test/new-e2e/examples/agentenv_metrics_test.go index 5370c184d06e6..d181e021d80c0 100644 --- a/test/new-e2e/examples/agentenv_metrics_test.go +++ b/test/new-e2e/examples/agentenv_metrics_test.go @@ -11,7 +11,6 @@ import ( "github.com/DataDog/datadog-agent/test/fakeintake/client" "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e" - "github.com/DataDog/test-infra-definitions/scenarios/aws/fakeintake/fakeintakeparams" "github.com/DataDog/test-infra-definitions/scenarios/aws/vm/ec2os" "github.com/DataDog/test-infra-definitions/scenarios/aws/vm/ec2params" "github.com/stretchr/testify/assert" @@ -24,7 +23,6 @@ type fakeintakeSuiteMetrics struct { func TestVMSuiteEx5(t *testing.T) { e2e.Run(t, &fakeintakeSuiteMetrics{}, e2e.FakeIntakeStackDef( - e2e.WithFakeIntakeParams(fakeintakeparams.WithoutLoadBalancer()), e2e.WithVMParams(ec2params.WithOS(ec2os.CentOS)), )) } diff --git a/test/new-e2e/tests/agent-shared-components/forwarder/nss_failover_test.go b/test/new-e2e/tests/agent-shared-components/forwarder/nss_failover_test.go index 225439084adbc..df97fec97f461 100644 --- a/test/new-e2e/tests/agent-shared-components/forwarder/nss_failover_test.go +++ b/test/new-e2e/tests/agent-shared-components/forwarder/nss_failover_test.go @@ -80,12 +80,12 @@ func multiFakeintakeStackDef(agentOptions ...agentparams.Option) *e2e.StackDefin return nil, err } - fiExporter1, err := aws.NewEcsFakeintake(awsEnv, fakeintakeparams.WithName(fakeintake1Name), fakeintakeparams.WithoutLoadBalancer()) + fiExporter1, err := aws.NewEcsFakeintake(awsEnv, fakeintakeparams.WithName(fakeintake1Name)) if err != nil { return nil, err } - fiExporter2, err := aws.NewEcsFakeintake(awsEnv, fakeintakeparams.WithName(fakeintake2Name), fakeintakeparams.WithoutLoadBalancer()) + fiExporter2, err := aws.NewEcsFakeintake(awsEnv, fakeintakeparams.WithName(fakeintake2Name)) if err != nil { return nil, err } diff --git a/test/new-e2e/tests/agent-subcommands/diagnose_test.go b/test/new-e2e/tests/agent-subcommands/diagnose_test.go index ee4e8647aa302..a7896f64b4f90 100644 --- a/test/new-e2e/tests/agent-subcommands/diagnose_test.go +++ b/test/new-e2e/tests/agent-subcommands/diagnose_test.go @@ -17,7 +17,6 @@ import ( "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e/client" svcmanager "github.com/DataDog/datadog-agent/test/new-e2e/tests/agent-platform/common/svc-manager" "github.com/DataDog/test-infra-definitions/components/datadog/agentparams" - "github.com/DataDog/test-infra-definitions/scenarios/aws/fakeintake/fakeintakeparams" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -34,7 +33,7 @@ var allSuites = []string{ } func TestAgentDiagnoseEC2Suite(t *testing.T) { - e2e.Run(t, &agentDiagnoseSuite{}, e2e.FakeIntakeStackDef(e2e.WithFakeIntakeParams(fakeintakeparams.WithoutLoadBalancer()))) + e2e.Run(t, &agentDiagnoseSuite{}, e2e.FakeIntakeStackDef()) } // type summary represents the number of success, fail, warnings and errors of a diagnose command diff --git a/test/new-e2e/tests/agent-subcommands/flare/flare_nix_test.go b/test/new-e2e/tests/agent-subcommands/flare/flare_nix_test.go index b639913ab2fd0..9ec2a45b830a2 100644 --- a/test/new-e2e/tests/agent-subcommands/flare/flare_nix_test.go +++ b/test/new-e2e/tests/agent-subcommands/flare/flare_nix_test.go @@ -14,7 +14,6 @@ import ( "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e" "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e/client" "github.com/DataDog/test-infra-definitions/components/datadog/agentparams" - "github.com/DataDog/test-infra-definitions/scenarios/aws/fakeintake/fakeintakeparams" "github.com/DataDog/test-infra-definitions/scenarios/aws/vm/ec2os" "github.com/DataDog/test-infra-definitions/scenarios/aws/vm/ec2params" ) @@ -34,7 +33,7 @@ type linuxFlareSuite struct { func TestLinuxFlareSuite(t *testing.T) { t.Parallel() - e2e.Run(t, &linuxFlareSuite{}, e2e.FakeIntakeStackDef(e2e.WithVMParams(ec2params.WithOS(ec2os.UbuntuOS)), e2e.WithFakeIntakeParams(fakeintakeparams.WithoutLoadBalancer()))) + e2e.Run(t, &linuxFlareSuite{}, e2e.FakeIntakeStackDef(e2e.WithVMParams(ec2params.WithOS(ec2os.UbuntuOS)))) } func (v *linuxFlareSuite) TestFlareWithAllConfiguration() { diff --git a/test/new-e2e/tests/agent-subcommands/flare/flare_win_test.go b/test/new-e2e/tests/agent-subcommands/flare/flare_win_test.go index 3379d8c899ab4..add1882fc2cf5 100644 --- a/test/new-e2e/tests/agent-subcommands/flare/flare_win_test.go +++ b/test/new-e2e/tests/agent-subcommands/flare/flare_win_test.go @@ -11,7 +11,6 @@ import ( "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e" "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e/client" - "github.com/DataDog/test-infra-definitions/scenarios/aws/fakeintake/fakeintakeparams" "github.com/DataDog/test-infra-definitions/scenarios/aws/vm/ec2os" "github.com/DataDog/test-infra-definitions/scenarios/aws/vm/ec2params" "github.com/stretchr/testify/assert" @@ -23,7 +22,7 @@ type windowsFlareSuite struct { func TestWindowsFlareSuite(t *testing.T) { t.Parallel() - e2e.Run(t, &windowsFlareSuite{}, e2e.FakeIntakeStackDef(e2e.WithVMParams(ec2params.WithOS(ec2os.WindowsOS)), e2e.WithFakeIntakeParams(fakeintakeparams.WithoutLoadBalancer()))) + e2e.Run(t, &windowsFlareSuite{}, e2e.FakeIntakeStackDef(e2e.WithVMParams(ec2params.WithOS(ec2os.WindowsOS)))) } func (v *windowsFlareSuite) TestFlareWindows() { diff --git a/test/new-e2e/tests/agent-subcommands/subcommands_test.go b/test/new-e2e/tests/agent-subcommands/subcommands_test.go index 6f7457ddc788e..1891fa3ec5983 100644 --- a/test/new-e2e/tests/agent-subcommands/subcommands_test.go +++ b/test/new-e2e/tests/agent-subcommands/subcommands_test.go @@ -14,8 +14,6 @@ import ( "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e" "github.com/DataDog/datadog-agent/test/new-e2e/pkg/utils/e2e/client" "github.com/DataDog/test-infra-definitions/components/datadog/agentparams" - "github.com/DataDog/test-infra-definitions/scenarios/aws/fakeintake/fakeintakeparams" - "github.com/cenkalti/backoff" "github.com/stretchr/testify/assert" ) @@ -30,7 +28,7 @@ type subcommandWithFakeIntakeSuite struct { func TestSubcommandSuite(t *testing.T) { e2e.Run(t, &subcommandSuite{}, e2e.AgentStackDef()) - e2e.Run(t, &subcommandWithFakeIntakeSuite{}, e2e.FakeIntakeStackDef(e2e.WithFakeIntakeParams(fakeintakeparams.WithoutLoadBalancer()))) + e2e.Run(t, &subcommandWithFakeIntakeSuite{}, e2e.FakeIntakeStackDef()) } // section contains the content status of a specific section (e.g. Forwarder) diff --git a/test/new-e2e/tests/ndm/snmp/snmpTestEnv.go b/test/new-e2e/tests/ndm/snmp/snmpTestEnv.go index c18dc830ddbae..449b3decb9dcc 100644 --- a/test/new-e2e/tests/ndm/snmp/snmpTestEnv.go +++ b/test/new-e2e/tests/ndm/snmp/snmpTestEnv.go @@ -16,7 +16,6 @@ import ( "github.com/DataDog/test-infra-definitions/components/datadog/agent" "github.com/DataDog/test-infra-definitions/components/datadog/dockeragentparams" "github.com/DataDog/test-infra-definitions/scenarios/aws" - "github.com/DataDog/test-infra-definitions/scenarios/aws/fakeintake/fakeintakeparams" "github.com/DataDog/test-infra-definitions/scenarios/aws/vm/ec2vm" "github.com/pulumi/pulumi/sdk/v3/go/auto" @@ -58,7 +57,7 @@ func NewTestEnv() (*TestEnv, error) { return err } - fakeintakeExporter, err := aws.NewEcsFakeintake(vm.GetAwsEnvironment(), fakeintakeparams.WithoutLoadBalancer()) + fakeintakeExporter, err := aws.NewEcsFakeintake(vm.GetAwsEnvironment()) if err != nil { return err } diff --git a/test/new-e2e/tests/process/linux_test.go b/test/new-e2e/tests/process/linux_test.go index 369abf2d2827e..1eb1b9e6b8757 100644 --- a/test/new-e2e/tests/process/linux_test.go +++ b/test/new-e2e/tests/process/linux_test.go @@ -10,7 +10,6 @@ import ( "time" "github.com/DataDog/test-infra-definitions/components/datadog/agentparams" - "github.com/DataDog/test-infra-definitions/scenarios/aws/fakeintake/fakeintakeparams" "github.com/stretchr/testify/assert" "github.com/DataDog/datadog-agent/test/fakeintake/aggregator" @@ -24,7 +23,6 @@ type linuxTestSuite struct { func TestLinuxTestSuite(t *testing.T) { e2e.Run(t, &linuxTestSuite{}, e2e.FakeIntakeStackDef( - e2e.WithFakeIntakeParams(fakeintakeparams.WithoutLoadBalancer()), e2e.WithAgentParams(agentparams.WithAgentConfig(processCheckConfigStr)), )) }