Skip to content

Commit

Permalink
tests: egressgw: export WatiForEgressGatewayBpfPolicyEntries
Browse files Browse the repository at this point in the history
and make it available to hooks

Signed-off-by: Gilberto Bertin <[email protected]>
  • Loading branch information
jibi committed Jan 5, 2024
1 parent c58c85f commit 162da0a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions connectivity/tests/egressgateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func (e *bpfEgressGatewayPolicyEntry) matches(t bpfEgressGatewayPolicyEntry) boo
t.GatewayIP == e.GatewayIP
}

// waitForBpfPolicyEntries waits for the egress gateway policy maps on each node to be populated with the entries
// returned by the targetEntriesCallback
func waitForBpfPolicyEntries(ctx context.Context, t *check.Test,
// WaitForEgressGatewayBpfPolicyEntries waits for the egress gateway policy maps on each node to WaitForEgressGatewayBpfPolicyEntries
// with the entries returned by the targetEntriesCallback
func WaitForEgressGatewayBpfPolicyEntries(ctx context.Context, t *check.Test,
targetEntriesCallback func(ciliumPod check.Pod) []bpfEgressGatewayPolicyEntry,
) {
ct := t.Context()
Expand Down Expand Up @@ -172,7 +172,7 @@ func (s *egressGateway) Run(ctx context.Context, t *check.Test) {
t.Fatal("Cannot get egress gateway node internal IP")
}

waitForBpfPolicyEntries(ctx, t, func(ciliumPod check.Pod) []bpfEgressGatewayPolicyEntry {
WaitForEgressGatewayBpfPolicyEntries(ctx, t, func(ciliumPod check.Pod) []bpfEgressGatewayPolicyEntry {
targetEntries := []bpfEgressGatewayPolicyEntry{}

egressIP := "0.0.0.0"
Expand Down Expand Up @@ -327,7 +327,7 @@ func (s *egressGatewayExcludedCIDRs) Run(ctx context.Context, t *check.Test) {
t.Fatal("Cannot get egress gateway node internal IP")
}

waitForBpfPolicyEntries(ctx, t, func(ciliumPod check.Pod) []bpfEgressGatewayPolicyEntry {
WaitForEgressGatewayBpfPolicyEntries(ctx, t, func(ciliumPod check.Pod) []bpfEgressGatewayPolicyEntry {
targetEntries := []bpfEgressGatewayPolicyEntry{}

egressIP := "0.0.0.0"
Expand Down

0 comments on commit 162da0a

Please sign in to comment.