diff options
Diffstat (limited to 'pkg/server/server_test.go')
-rw-r--r-- | pkg/server/server_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/server/server_test.go b/pkg/server/server_test.go index b12481bd..e56c6302 100644 --- a/pkg/server/server_test.go +++ b/pkg/server/server_test.go @@ -68,13 +68,13 @@ func TestModPolicyAssign(t *testing.T) { } r := f([]*config.PolicyDefinition{&config.PolicyDefinition{Name: "p1"}, &config.PolicyDefinition{Name: "p2"}, &config.PolicyDefinition{Name: "p3"}}) - r.Type = api.PolicyDirection_IMPORT - r.Default = api.RouteAction_ACCEPT + r.Direction = api.PolicyDirection_IMPORT + r.DefaultAction = api.RouteAction_ACCEPT r.Name = table.GLOBAL_RIB_NAME err = s.AddPolicyAssignment(context.Background(), &api.AddPolicyAssignmentRequest{Assignment: r}) assert.Nil(err) - r.Type = api.PolicyDirection_EXPORT + r.Direction = api.PolicyDirection_EXPORT err = s.AddPolicyAssignment(context.Background(), &api.AddPolicyAssignmentRequest{Assignment: r}) assert.Nil(err) @@ -85,8 +85,8 @@ func TestModPolicyAssign(t *testing.T) { assert.Equal(len(ps[0].Policies), 3) r = f([]*config.PolicyDefinition{&config.PolicyDefinition{Name: "p1"}}) - r.Type = api.PolicyDirection_IMPORT - r.Default = api.RouteAction_ACCEPT + r.Direction = api.PolicyDirection_IMPORT + r.DefaultAction = api.RouteAction_ACCEPT r.Name = table.GLOBAL_RIB_NAME err = s.DeletePolicyAssignment(context.Background(), &api.DeletePolicyAssignmentRequest{Assignment: r}) assert.Nil(err) @@ -135,10 +135,10 @@ func TestListPolicyAssignment(t *testing.T) { assert.Nil(err) pa := &api.PolicyAssignment{ - Type: api.PolicyDirection_IMPORT, - Default: api.RouteAction_ACCEPT, - Name: addr, - Policies: []*api.Policy{&api.Policy{Name: fmt.Sprintf("p%d", i)}}, + Direction: api.PolicyDirection_IMPORT, + DefaultAction: api.RouteAction_ACCEPT, + Name: addr, + Policies: []*api.Policy{&api.Policy{Name: fmt.Sprintf("p%d", i)}}, } err = s.AddPolicyAssignment(context.Background(), &api.AddPolicyAssignmentRequest{Assignment: pa}) assert.Nil(err) |