mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
test(service): remove legacy routing assertions
Updates TestSyncProviders_WritesSnapshot by removing assertions for routing keys that are no longer generated following the legacy routing removal.
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
|||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSyncProviders_WritesSnapshotAndRouting(t *testing.T) {
|
func TestSyncProviders_WritesSnapshot(t *testing.T) {
|
||||||
mr := miniredis.RunT(t)
|
mr := miniredis.RunT(t)
|
||||||
rdb := redis.NewClient(&redis.Options{Addr: mr.Addr()})
|
rdb := redis.NewClient(&redis.Options{Addr: mr.Addr()})
|
||||||
svc := NewSyncService(rdb)
|
svc := NewSyncService(rdb)
|
||||||
@@ -61,18 +61,6 @@ func TestSyncProviders_WritesSnapshotAndRouting(t *testing.T) {
|
|||||||
if snap["group"] != "default" {
|
if snap["group"] != "default" {
|
||||||
t.Fatalf("expected group default, got %#v", snap["group"])
|
t.Fatalf("expected group default, got %#v", snap["group"])
|
||||||
}
|
}
|
||||||
|
|
||||||
routeKey := "route:group:default:gemini-3-pro-preview"
|
|
||||||
if !mr.Exists(routeKey) {
|
|
||||||
t.Fatalf("expected routing key %q to exist", routeKey)
|
|
||||||
}
|
|
||||||
ok, err := mr.SIsMember(routeKey, jsonID(key.ID))
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("SIsMember: %v", err)
|
|
||||||
}
|
|
||||||
if !ok {
|
|
||||||
t.Fatalf("expected provider id in routing set %q", routeKey)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSyncKey_WritesTokenID(t *testing.T) {
|
func TestSyncKey_WritesTokenID(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user