diff --git a/test/new-e2e/tests/process/k8s_test.go b/test/new-e2e/tests/process/k8s_test.go index 1533bea01cb360..7ec7ccff168887 100644 --- a/test/new-e2e/tests/process/k8s_test.go +++ b/test/new-e2e/tests/process/k8s_test.go @@ -156,21 +156,32 @@ func (s *K8sSuite) TestProcessDiscoveryCheck() { assertProcessDiscoveryCollected(t, payloads, "stress-ng-cpu [run]") } -func (s *K8sSuite) TestProcessCheckInCoreAgent() { - t := s.T() +type K8sCoreAgentSuite struct { + e2e.BaseSuite[environments.Kubernetes] +} +func TestK8sCoreAgentTestSuite(t *testing.T) { + t.Parallel() helmValues, err := createHelmValues(helmConfig{ ProcessCollection: true, RunInCoreAgent: true, }) require.NoError(t, err) - s.UpdateEnv(awskubernetes.KindProvisioner( - awskubernetes.WithWorkloadApp(func(e config.Env, kubeProvider *kubernetes.Provider) (*kubeComp.Workload, error) { - return cpustress.K8sAppDefinition(e, kubeProvider, "workload-stress") - }), - awskubernetes.WithAgentOptions(kubernetesagentparams.WithHelmValues(helmValues)), - )) + options := []e2e.SuiteOption{ + e2e.WithProvisioner(awskubernetes.KindProvisioner( + awskubernetes.WithWorkloadApp(func(e config.Env, kubeProvider *kubernetes.Provider) (*kubeComp.Workload, error) { + return cpustress.K8sAppDefinition(e, kubeProvider, "workload-stress") + }), + awskubernetes.WithAgentOptions(kubernetesagentparams.WithHelmValues(helmValues)), + )), + } + + e2e.Run(t, &K8sCoreAgentSuite{}, options...) +} + +func (s *K8sCoreAgentSuite) TestProcessCheckInCoreAgent() { + t := s.T() var status AgentStatus defer func() { @@ -207,7 +218,7 @@ func (s *K8sSuite) TestProcessCheckInCoreAgent() { assertContainersNotCollected(t, payloads, []string{"process-agent"}) } -func (s *K8sSuite) TestProcessCheckInCoreAgentWithNPM() { +func (s *K8sCoreAgentSuite) TestProcessCheckInCoreAgentWithNPM() { t := s.T() helmValues, err := createHelmValues(helmConfig{