mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
The config schema did not enumerate provider values, and the configuration docs only described the field generically. Add explicit provider enum values to the generated schema, document the same values in the config file guide, and make provider lookup case-insensitive so lowercase documented values work for providers whose internal names are capitalized. Constraint: Central Station bounty asks for provider names to be discoverable in docs and JSON schema Rejected: Docs-only update | would leave railpack schema incomplete Confidence: high Scope-risk: narrow Directive: Keep provider docs and schema enum aligned with core/providers/provider.go Tested: go test ./core/config ./core/providers; bun run build in docs; go run ./cmd/cli schema shows provider enum; git diff --check Not-tested: go test ./... fails on existing environment/snapshot drift: Caddy/FrankenPHP patch snapshots and missing BUILDKIT_HOST for integration tests
15 lines
306 B
Go
15 lines
306 B
Go
package providers
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGetProviderIsCaseInsensitive(t *testing.T) {
|
|
require.NotNil(t, GetProvider("elixir"))
|
|
require.NotNil(t, GetProvider("Elixir"))
|
|
require.NotNil(t, GetProvider("dotnet"))
|
|
require.NotNil(t, GetProvider("Dotnet"))
|
|
}
|