diff --git a/integration-tests/integration_test.go b/integration-tests/integration_test.go index fd7e7cdc14d..caf24095543 100644 --- a/integration-tests/integration_test.go +++ b/integration-tests/integration_test.go @@ -123,8 +123,8 @@ func TestDuplicateEndpoints(t *testing.T) { suite.Run(t, new(suites.DuplicateEndpointsTestSuite)) } -func TestChangeProcessName1(t *testing.T) { - changeProcessName := &suites.ChangeProcessNameTestSuite{ +func TestProcessesAndEndpoints1(t *testing.T) { + processesAndEndpoints := &suites.ProcessesAndEndpointsTestSuite{ Executable: "./change-process-name", ContainerName: "change-process-name", ExpectedEndpoints: []types.EndpointInfo{ @@ -151,11 +151,11 @@ func TestChangeProcessName1(t *testing.T) { }, }, } - suite.Run(t, changeProcessName) + suite.Run(t, processesAndEndpoints) } -func TestChangeProcessName2(t *testing.T) { - changeProcessName := &suites.ChangeProcessNameTestSuite{ +func TestProcessesAndEndpoints2(t *testing.T) { + processesAndEndpoints := &suites.ProcessesAndEndpointsTestSuite{ Executable: "./change-executable-file-path", ContainerName: "change-executable-file-path", ExpectedEndpoints: []types.EndpointInfo{ @@ -182,11 +182,11 @@ func TestChangeProcessName2(t *testing.T) { }, }, } - suite.Run(t, changeProcessName) + suite.Run(t, processesAndEndpoints) } -func TestChangeProcessNameChildProcess(t *testing.T) { - changeProcessName := &suites.ChangeProcessNameTestSuite{ +func TestProcessesAndEndpointsChildProcess(t *testing.T) { + processesAndEndpoints := &suites.ProcessesAndEndpointsTestSuite{ Executable: "./listening-endpoint-child-process", ContainerName: "listening-endpoint-child-process", ExpectedEndpoints: []types.EndpointInfo{ @@ -218,11 +218,11 @@ func TestChangeProcessNameChildProcess(t *testing.T) { }, }, } - suite.Run(t, changeProcessName) + suite.Run(t, processesAndEndpoints) } -func TestChangeProcessNameChildProcessNoExec(t *testing.T) { - changeProcessName := &suites.ChangeProcessNameTestSuite{ +func TestProcessesAndEndpointsChildProcessNoExec(t *testing.T) { + processesAndEndpoints := &suites.ProcessesAndEndpointsTestSuite{ Executable: "./listening-endpoint-child-process-no-exec", ContainerName: "listening-endpoint-child-process-no-exec", ExpectedEndpoints: []types.EndpointInfo{ @@ -249,11 +249,11 @@ func TestChangeProcessNameChildProcessNoExec(t *testing.T) { }, }, } - suite.Run(t, changeProcessName) + suite.Run(t, processesAndEndpoints) } -func TestChangeProcessNameChildProcessNoFork(t *testing.T) { - changeProcessName := &suites.ChangeProcessNameTestSuite{ +func TestProcessesAndEndpointsChildProcessNoFork(t *testing.T) { + processesAndEndpoints := &suites.ProcessesAndEndpointsTestSuite{ Executable: "./listening-endpoint-child-process-no-fork", ContainerName: "listening-endpoint-child-process-no-fork", ExpectedEndpoints: []types.EndpointInfo{ @@ -283,11 +283,11 @@ func TestChangeProcessNameChildProcessNoFork(t *testing.T) { }, }, } - suite.Run(t, changeProcessName) + suite.Run(t, processesAndEndpoints) } -func TestChangeProcessNameChildProcessNoForkDelay(t *testing.T) { - changeProcessName := &suites.ChangeProcessNameTestSuite{ +func TestProcessesAndEndpointsChildProcessNoForkDelay(t *testing.T) { + processesAndEndpoints := &suites.ProcessesAndEndpointsTestSuite{ Executable: "./listening-endpoint-child-process-no-fork", Args: []string{"5"}, ContainerName: "listening-endpoint-child-process-no-fork", @@ -320,7 +320,7 @@ func TestChangeProcessNameChildProcessNoForkDelay(t *testing.T) { }, }, } - suite.Run(t, changeProcessName) + suite.Run(t, processesAndEndpoints) } func TestConnectionsAndEndpointsNormal(t *testing.T) { diff --git a/integration-tests/suites/change_process_name.go b/integration-tests/suites/processes_and_endpoints.go similarity index 91% rename from integration-tests/suites/change_process_name.go rename to integration-tests/suites/processes_and_endpoints.go index 0198a84b366..25ded52257e 100644 --- a/integration-tests/suites/change_process_name.go +++ b/integration-tests/suites/processes_and_endpoints.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" ) -type ChangeProcessNameTestSuite struct { +type ProcessesAndEndpointsTestSuite struct { IntegrationTestSuiteBase container string Executable string @@ -19,7 +19,7 @@ type ChangeProcessNameTestSuite struct { ContainerName string } -func (s *ChangeProcessNameTestSuite) SetupSuite() { +func (s *ProcessesAndEndpointsTestSuite) SetupSuite() { collector := s.Collector() @@ -39,13 +39,13 @@ func (s *ChangeProcessNameTestSuite) SetupSuite() { time.Sleep(20 * time.Second) } -func (s *ChangeProcessNameTestSuite) TearDownSuite() { +func (s *ProcessesAndEndpointsTestSuite) TearDownSuite() { s.StopCollector() s.cleanupContainer([]string{"collector"}) s.cleanupContainer([]string{s.ContainerName}) } -func (s *ChangeProcessNameTestSuite) TestChangeProcessName() { +func (s *ProcessesAndEndpointsTestSuite) TestProcessesAndEndpoints() { processes := s.Sensor().Processes(s.container) endpoints := s.Sensor().Endpoints(s.container)