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

[PROCS-4589] Split K8s e2e test #31985

Merged
merged 2 commits into from
Dec 10, 2024
Merged
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
29 changes: 20 additions & 9 deletions test/new-e2e/tests/process/k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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{
Expand Down
Loading