on main help sign in
chore: fix tests
commit05a3e9a0303569feb3796e0e3c8eb5b7cfcf34f2 authorKujtim Hoxha <kujtimii.h@gmail.com> dateFri 25 Jul 2025, 12:04 (1 year ago) parent8c87429
1 file changed+4−4
internal/config/load_test.go+4−4
internal/config/load_test.go+4−4
@@ -615,7 +615,7 @@ func TestConfig_configureProvidersCustomProviderValidation(t *testing.T) {
615615
616616 t.Run("custom anthropic provider is supported", func(t *testing.T) {
617617 cfg := &Config{
618− Providers: map[string]ProviderConfig{
618+ Providers: csync.NewMapFrom(map[string]ProviderConfig{
619619 "custom-anthropic": {
620620 APIKey: "test-key",
621621 BaseURL: "https://api.anthropic.com/v1",
@@ -624,7 +624,7 @@ func TestConfig_configureProvidersCustomProviderValidation(t *testing.T) {
624624 ID: "claude-3-sonnet",
625625 }},
626626 },
627− },
627+ }),
628628 }
629629 cfg.setDefaults("/tmp")
630630
@@ -633,8 +633,8 @@ func TestConfig_configureProvidersCustomProviderValidation(t *testing.T) {
633633 err := cfg.configureProviders(env, resolver, []catwalk.Provider{})
634634 assert.NoError(t, err)
635635
636− assert.Len(t, cfg.Providers, 1)
637− customProvider, exists := cfg.Providers["custom-anthropic"]
636+ assert.Equal(t, cfg.Providers.Len(), 1)
637+ customProvider, exists := cfg.Providers.Get("custom-anthropic")
638638 assert.True(t, exists)
639639 assert.Equal(t, "custom-anthropic", customProvider.ID)
640640 assert.Equal(t, "test-key", customProvider.APIKey)