docs: enhance EvoBGP architecture plan with new risk mitigation strategies, testing matrix for BIRD2, and CI/CD workflow details. Updated section titles for clarity and added completed todos for deployment practices.
CI / openapi (push) Successful in 1m35s
CI / go (push) Failing after 16s
CI / bird2 (push) Has been skipped

This commit is contained in:
Denozordec
2026-04-04 01:27:17 +07:00
parent 4480d64a7f
commit 3992d01c3e
30 changed files with 621 additions and 2 deletions
+68
View File
@@ -0,0 +1,68 @@
package birdfmt
import (
"path"
"slices"
"strings"
"testing"
)
func TestBirdScenarioPaths_Table(t *testing.T) {
paths, err := BirdScenarioPaths()
if err != nil {
t.Fatal(err)
}
// Expected scenario leaf names — extend when adding directories under testdata/scenarios.
wantNames := []string{
"bgp_dual_peer",
"bgp_ipv4_peer",
"bgp_ipv6_peer",
"domains_resolved",
"empty_static",
"filter_export",
"large_prefix_list",
"mixed_static_bgp",
"minimal",
"static_ipv4",
"with_include",
}
var gotNames []string
for _, p := range paths {
gotNames = append(gotNames, path.Base(p))
}
slices.Sort(gotNames)
if !slices.Equal(gotNames, wantNames) {
t.Fatalf("scenario set drift: got %v want %v", gotNames, wantNames)
}
for _, p := range paths {
t.Run(path.Base(p), func(t *testing.T) {
b, err := ReadScenarioBirdConf(p)
if err != nil {
t.Fatal(err)
}
if len(b) == 0 {
t.Fatal("empty bird.conf")
}
if !strings.Contains(string(b), "router id") {
t.Fatal("expected router id in scenario")
}
})
}
}
func TestRepoRelativeBirdConf_Table(t *testing.T) {
paths, err := BirdScenarioPaths()
if err != nil {
t.Fatal(err)
}
for _, p := range paths {
rel := RepoRelativeBirdConf(p)
if !strings.HasPrefix(rel, "internal/birdfmt/") {
t.Fatalf("%s: bad prefix %q", p, rel)
}
if !strings.HasSuffix(rel, "/bird.conf") {
t.Fatalf("%s: expected .../bird.conf, got %q", p, rel)
}
}
}