Refactor module binding to rely on Type

This commit is contained in:
2025-11-18 16:11:13 +08:00
parent 347eb3adc5
commit fc2c46a9df
10 changed files with 46 additions and 68 deletions

View File

@@ -54,8 +54,8 @@ func TestHubRegistryLookupByHost(t *testing.T) {
if route.CacheStrategy.ValidationMode == "" {
t.Fatalf("cache strategy validation mode should not be empty")
}
if route.ModuleKey != "docker" {
t.Fatalf("expected docker module, got %s", route.ModuleKey)
if route.Module.Key != "docker" {
t.Fatalf("expected docker module, got %s", route.Module.Key)
}
if route.UpstreamURL.String() != "https://registry-1.docker.io" {