feat: enhance community attribute handling in BIRD format. Add validation for community route bodies to ensure correct tuple structure and introduce tests for single-element standard arrays, improving error handling and robustness in community attribute processing.
This commit is contained in:
@@ -21,3 +21,10 @@ func TestRouteCommunityAttrs_LargeJSON(t *testing.T) {
|
||||
t.Fatalf("got %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRouteCommunityAttrs_StandardArrayOneElement(t *testing.T) {
|
||||
_, err := RouteCommunityAttrs("", "x", `{"standard":[65000]}`)
|
||||
if err == nil {
|
||||
t.Fatal("expected error for single-element standard pair")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user