Compose runtime glossary files with native configuration
This commit is contained in:
@@ -37,8 +37,11 @@ func TestBootstrapConfigurationOutcomes(t *testing.T) {
|
||||
loads := 0
|
||||
load := func(ctx context.Context, selection ckconfig.Selection, _, _ struct{}) (*ck.Result[appconfig.Config], error) {
|
||||
loads++
|
||||
result, report, err := appconfig.Load(ctx, ck.Input{Source: ck.File(selection.Config.Value)}, "")
|
||||
return result, reportBootstrap(ctx, report, err)
|
||||
result, report, err := appconfig.Load(ctx, ck.Input{Source: ck.File(selection.Config.Value)}, appconfig.Options{})
|
||||
if err != nil {
|
||||
return nil, reportBootstrap(ctx, report, err)
|
||||
}
|
||||
return result.Result, reportBootstrap(ctx, report, nil)
|
||||
}
|
||||
scope := withBootstrapContext(ckconfig.FromConfigKit("app", "Application settings", load))
|
||||
command := ckconfig.Command(ckconfig.Suite[struct{}, struct{}]{Scopes: []ckconfig.Scope[struct{}, struct{}]{scope}})
|
||||
@@ -87,7 +90,7 @@ func TestBootstrapPreservesJoinedCancellation(t *testing.T) {
|
||||
if err := os.WriteFile(main, []byte("version: 3\nconfig:\n secrets_dir: missing\n"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_, report, err := appconfig.Load(context.Background(), ck.Input{Source: ck.File(main)}, "")
|
||||
_, report, err := appconfig.Load(context.Background(), ck.Input{Source: ck.File(main)}, appconfig.Options{})
|
||||
joined := errors.Join(err, context.Canceled)
|
||||
wrapped := reportBootstrap(context.Background(), report, joined)
|
||||
var native *ck.SecretsError
|
||||
@@ -110,7 +113,7 @@ func TestPromptBootstrapFailureReportsTerminalDetails(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
load := func(ctx context.Context, selection ckconfig.Selection, _, _ struct{}) (*pk.Engine, error) {
|
||||
_, report, err := appconfig.Load(ctx, ck.Input{Source: ck.File(selection.Config.Value)}, "")
|
||||
_, report, err := appconfig.Load(ctx, ck.Input{Source: ck.File(selection.Config.Value)}, appconfig.Options{})
|
||||
return nil, reportBootstrap(ctx, report, err)
|
||||
}
|
||||
suite := withPromptBootstrapContext(ckprompt.FromEngine(load))
|
||||
|
||||
Reference in New Issue
Block a user