From 9c03ad2c148684a51e29692555d979c9b6d94c58 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Tue, 17 Mar 2026 18:58:18 -0500 Subject: [PATCH] test getting running config from router --- router_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/router_test.go b/router_test.go index 2359245..2926c81 100644 --- a/router_test.go +++ b/router_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "log/slog" + "reflect" "sync" "testing" "time" @@ -80,7 +81,7 @@ func TestNewRouter(t *testing.T) { }, } - _, moduleErrors, routeErrors := showbridge.NewRouter(routerConfig) + router, moduleErrors, routeErrors := showbridge.NewRouter(routerConfig) if moduleErrors != nil { t.Fatalf("router should not have returned any module errors: %v", moduleErrors) @@ -89,6 +90,10 @@ func TestNewRouter(t *testing.T) { if routeErrors != nil { t.Fatalf("router should not have returned any route errors: %v", routeErrors) } + + if !reflect.DeepEqual(routerConfig, router.RunningConfig()) { + t.Fatalf("router running config did not match expected, got: %v, expected: %v", router.RunningConfig(), routerConfig) + } } func TestNewRouterNoModuleId(t *testing.T) {