Skip to content

Commit

Permalink
[v14] deprecate fanoutv1 (#38129)
Browse files Browse the repository at this point in the history
* deprecate fanoutv1 (#37836)

* fix bpf test
  • Loading branch information
fspmarshall authored Feb 23, 2024
1 parent 41cfaf0 commit 3f70e74
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 622 deletions.
8 changes: 5 additions & 3 deletions lib/restrictedsession/restricted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,15 @@ func setupBPFContext(t *testing.T) *bpfContext {

client := &mockClient{
restrictions: restrictions,
Fanout: *services.NewFanout(),
FanoutV2: *services.NewFanoutV2(services.FanoutV2Config{
Capacity: 64,
}),
}

bpfCtx.restrictedMgr, err = New(config, client)
require.NoError(t, err)

client.Fanout.SetInit([]api.WatchKind{{Kind: api.KindNetworkRestrictions}})
client.FanoutV2.SetInit([]api.WatchKind{{Kind: api.KindNetworkRestrictions}})

time.Sleep(100 * time.Millisecond)

Expand Down Expand Up @@ -408,7 +410,7 @@ func TestRootNetwork(t *testing.T) {

type mockClient struct {
restrictions api.NetworkRestrictions
services.Fanout
services.FanoutV2
}

func (mc *mockClient) GetNetworkRestrictions(context.Context) (api.NetworkRestrictions, error) {
Expand Down
Loading

0 comments on commit 3f70e74

Please sign in to comment.