diff options
author | Vincent Bernat <vincent@bernat.im> | 2016-10-08 11:19:29 +0200 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-10-08 06:11:08 -0700 |
commit | ddb9303bb5b02a8ad4401611d3866ffd09b57add (patch) | |
tree | 085f95ad70fa2fc075197a67b9ab0f6e5cad3cb1 /table/policy_test.go | |
parent | cab09990b87f98ed61d3bb596695c6f35c47c624 (diff) |
table: ensure compatibility with archs where int == int32
MED actions are expected to be int64 and AS are expected to be
uint32. Use ParseInt/ParseUint instead of Atoi for those until the tests
pass on ARM.
Diffstat (limited to 'table/policy_test.go')
-rw-r--r-- | table/policy_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/table/policy_test.go b/table/policy_test.go index c5050b56..d9767ad4 100644 --- a/table/policy_test.go +++ b/table/policy_test.go @@ -2335,7 +2335,7 @@ func TestPolicyMatchAndAddingMedOverFlow(t *testing.T) { ds.PrefixSets = []config.PrefixSet{ps} ds.NeighborSets = []config.NeighborSet{ns} - m := fmt.Sprintf("+%d", math.MaxUint32) + m := fmt.Sprintf("+%d", uint32(math.MaxUint32)) ma := "1" s := createStatement("statement1", "ps1", "ns1", true) @@ -2623,7 +2623,8 @@ func TestPolicyAs4PathPrepend(t *testing.T) { //test r := NewRoutingPolicy() r.reload(pl) - p, _ := NewPolicy(pl.PolicyDefinitions[0]) + p, err := NewPolicy(pl.PolicyDefinitions[0]) + assert.Nil(err) addPolicy(r, p) pType, newPath := p.Apply(path, nil) |