Compose runtime glossary files with native configuration
This commit is contained in:
@@ -24,7 +24,7 @@ func TestLoadBootstrapsSecrets(t *testing.T) {
|
||||
if err := os.WriteFile(main, []byte("version: 3\nconfig:\n secrets_dir: secrets\n secrets_overwrite: true\n"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
result, report, err := Load(context.Background(), ck.Input{Source: ck.File(main)}, "")
|
||||
result, report, err := Load(context.Background(), ck.Input{Source: ck.File(main)}, Options{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -39,14 +39,14 @@ func TestLoadRetainsBootstrapErrorAndCancellation(t *testing.T) {
|
||||
if err := os.WriteFile(main, []byte("version: 3\nconfig:\n secrets_dir: missing\n"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
result, report, err := Load(context.Background(), ck.Input{Source: ck.File(main)}, "")
|
||||
result, report, err := Load(context.Background(), ck.Input{Source: ck.File(main)}, Options{})
|
||||
var secretsErr *ck.SecretsError
|
||||
if result != nil || report == nil || !errors.As(err, &secretsErr) {
|
||||
t.Fatalf("result=%v report=%v error=%v", result, report, err)
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
result, _, err = Load(ctx, ck.Input{Source: ck.File(main)}, "")
|
||||
result, _, err = Load(ctx, ck.Input{Source: ck.File(main)}, Options{})
|
||||
if result != nil || !errors.Is(err, context.Canceled) {
|
||||
t.Fatalf("result=%v error=%v", result, err)
|
||||
}
|
||||
@@ -65,7 +65,7 @@ func TestLoadReusesPreparedMainSnapshot(t *testing.T) {
|
||||
if err := os.WriteFile(main, []byte("version: 3\ncontext:\n description: changed\n"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
result, _, err := Load(context.Background(), ck.Input{Source: prepared, Filesystem: &ck.FilesystemContext{Root: dir}}, "")
|
||||
result, _, err := Load(context.Background(), ck.Input{Source: prepared, Filesystem: &ck.FilesystemContext{Root: dir}}, Options{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user