9
9
"github.com/stackrox/collector/integration-tests/pkg/types"
10
10
11
11
sensorAPI "github.com/stackrox/rox/generated/internalapi/sensor"
12
+ "github.com/stackrox/rox/generated/storage"
12
13
)
13
14
14
15
type ProcessNetworkTestSuite struct {
@@ -74,7 +75,7 @@ func (s *ProcessNetworkTestSuite) SetupSuite() {
74
75
s .serverPort , err = s .getPort ("nginx" )
75
76
s .Require ().NoError (err )
76
77
77
- _ , err = s .execContainer ("nginx-curl" , []string {"curl" , fmt .Sprintf ("%s:%s " , s .serverIP , s .serverPort )}, false )
78
+ _ , err = s .execContainer ("nginx-curl" , []string {"curl" , fmt .Sprintf ("%s:%d " , s .serverIP , s .serverPort )}, false )
78
79
s .Require ().NoError (err )
79
80
80
81
s .clientIP , err = s .getIPAddress ("nginx-curl" )
@@ -151,7 +152,8 @@ func (s *ProcessNetworkTestSuite) TestNetworkFlows() {
151
152
s .Sensor ().ExpectConnections (s .T (), s .serverContainer , 10 * time .Second ,
152
153
& sensorAPI.NetworkConnection {
153
154
LocalAddress : types .CreateNetworkAddress ("" , "" , s .serverPort ),
154
- RemoteAddress : types .CreateNetworkAddress (s .clientIP , "" , s .serverPort ),
155
+ RemoteAddress : types .CreateNetworkAddress (s .clientIP , "" , 0 ),
156
+ Protocol : storage .L4Protocol_L4_PROTOCOL_TCP ,
155
157
Role : sensorAPI .ClientServerRole_ROLE_SERVER ,
156
158
SocketFamily : sensorAPI .SocketFamily_SOCKET_FAMILY_UNKNOWN ,
157
159
CloseTimestamp : nil ,
@@ -161,7 +163,8 @@ func (s *ProcessNetworkTestSuite) TestNetworkFlows() {
161
163
s .Sensor ().ExpectConnections (s .T (), s .clientContainer , 10 * time .Second ,
162
164
& sensorAPI.NetworkConnection {
163
165
LocalAddress : types .CreateNetworkAddress ("" , "" , 0 ),
164
- RemoteAddress : types .CreateNetworkAddress (s .clientIP , "" , s .serverPort ),
166
+ RemoteAddress : types .CreateNetworkAddress (s .serverIP , "" , s .serverPort ),
167
+ Protocol : storage .L4Protocol_L4_PROTOCOL_TCP ,
165
168
Role : sensorAPI .ClientServerRole_ROLE_CLIENT ,
166
169
SocketFamily : sensorAPI .SocketFamily_SOCKET_FAMILY_UNKNOWN ,
167
170
CloseTimestamp : nil ,
0 commit comments