6
6
"time"
7
7
8
8
sensorAPI "github.com/stackrox/rox/generated/internalapi/sensor"
9
+ "github.com/stackrox/rox/generated/storage"
9
10
10
11
"github.com/stackrox/collector/integration-tests/pkg/collector"
11
12
"github.com/stackrox/collector/integration-tests/pkg/common"
@@ -129,7 +130,7 @@ func (s *UdpNetworkFlow) runTest(image, recv, send string, port uint32) {
129
130
serverConnection := & sensorAPI.NetworkConnection {
130
131
LocalAddress : types .CreateNetworkAddress ("" , "" , server .port ),
131
132
RemoteAddress : types .CreateNetworkAddress (client .ip , "" , 0 ),
132
- Role : sensorAPI .ClientServerRole_ROLE_CLIENT ,
133
+ Role : sensorAPI .ClientServerRole_ROLE_SERVER ,
133
134
SocketFamily : sensorAPI .SocketFamily_SOCKET_FAMILY_UNKNOWN ,
134
135
CloseTimestamp : nil ,
135
136
}
@@ -157,6 +158,7 @@ func (s *UdpNetworkFlow) TestMultipleDestinations() {
157
158
clientConnections [i ] = & sensorAPI.NetworkConnection {
158
159
LocalAddress : types .CreateNetworkAddress ("" , "" , 0 ),
159
160
RemoteAddress : types .CreateNetworkAddress (servers [i ].ip , "" , servers [i ].port ),
161
+ Protocol : storage .L4Protocol_L4_PROTOCOL_UDP ,
160
162
Role : sensorAPI .ClientServerRole_ROLE_CLIENT ,
161
163
SocketFamily : sensorAPI .SocketFamily_SOCKET_FAMILY_UNKNOWN ,
162
164
CloseTimestamp : nil ,
@@ -178,7 +180,8 @@ func (s *UdpNetworkFlow) TestMultipleDestinations() {
178
180
serverConnection := & sensorAPI.NetworkConnection {
179
181
LocalAddress : types .CreateNetworkAddress ("" , "" , server .port ),
180
182
RemoteAddress : types .CreateNetworkAddress (client .ip , "" , 0 ),
181
- Role : sensorAPI .ClientServerRole_ROLE_CLIENT ,
183
+ Protocol : storage .L4Protocol_L4_PROTOCOL_UDP ,
184
+ Role : sensorAPI .ClientServerRole_ROLE_SERVER ,
182
185
SocketFamily : sensorAPI .SocketFamily_SOCKET_FAMILY_UNKNOWN ,
183
186
CloseTimestamp : nil ,
184
187
}
@@ -214,7 +217,8 @@ func (s *UdpNetworkFlow) TestMultipleSources() {
214
217
serverConnections [i ] = & sensorAPI.NetworkConnection {
215
218
LocalAddress : types .CreateNetworkAddress ("" , "" , server .port ),
216
219
RemoteAddress : types .CreateNetworkAddress (clients [i ].ip , "" , 0 ),
217
- Role : sensorAPI .ClientServerRole_ROLE_CLIENT ,
220
+ Protocol : storage .L4Protocol_L4_PROTOCOL_UDP ,
221
+ Role : sensorAPI .ClientServerRole_ROLE_SERVER ,
218
222
SocketFamily : sensorAPI .SocketFamily_SOCKET_FAMILY_UNKNOWN ,
219
223
CloseTimestamp : nil ,
220
224
}
@@ -223,6 +227,7 @@ func (s *UdpNetworkFlow) TestMultipleSources() {
223
227
clientConnection := & sensorAPI.NetworkConnection {
224
228
LocalAddress : types .CreateNetworkAddress ("" , "" , 0 ),
225
229
RemoteAddress : types .CreateNetworkAddress (server .ip , "" , server .port ),
230
+ Protocol : storage .L4Protocol_L4_PROTOCOL_UDP ,
226
231
Role : sensorAPI .ClientServerRole_ROLE_CLIENT ,
227
232
SocketFamily : sensorAPI .SocketFamily_SOCKET_FAMILY_UNKNOWN ,
228
233
CloseTimestamp : nil ,
0 commit comments