Load native PromptKit settings through application configuration version six
This commit is contained in:
@@ -64,7 +64,7 @@ func TestDocumentPathsUseDeclaringFilesAcrossImports(t *testing.T) {
|
||||
`), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(main, []byte(`version: 5
|
||||
if err := os.WriteFile(main, []byte(`version: 6
|
||||
config:
|
||||
imports:
|
||||
- path: fragments/pipelines.yml
|
||||
@@ -102,7 +102,7 @@ func TestDiscoveredMainAndStepReferenceNormalization(t *testing.T) {
|
||||
}
|
||||
main := filepath.Join(root, "notarius.yml")
|
||||
fragment := filepath.Join(fragmentDir, "pipeline.yml")
|
||||
if err := os.WriteFile(main, []byte("version: 5\nconfig:\n imports:\n - path: fragments/pipeline.yml\n required: true\n"), 0600); err != nil {
|
||||
if err := os.WriteFile(main, []byte("version: 6\nconfig:\n imports:\n - path: fragments/pipeline.yml\n required: true\n"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(fragment, []byte(`pipelines:
|
||||
@@ -144,7 +144,7 @@ func TestDocumentPathsUseInvocationDirectoryForOverrides(t *testing.T) {
|
||||
|
||||
root := t.TempDir()
|
||||
configPath := filepath.Join(root, "notarius.yml")
|
||||
if err := os.WriteFile(configPath, []byte("version: 5\n"), 0o600); err != nil {
|
||||
if err := os.WriteFile(configPath, []byte("version: 6\n"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
invocation := t.TempDir()
|
||||
@@ -167,7 +167,7 @@ func TestDiscoveredSymlinkUsesCanonicalMainDirectory(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
main := filepath.Join(realDir, "main.yml")
|
||||
if err := os.WriteFile(main, []byte("version: 5\n"), 0600); err != nil {
|
||||
if err := os.WriteFile(main, []byte("version: 6\n"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
link := filepath.Join(root, "notarius.yml")
|
||||
@@ -200,7 +200,7 @@ func TestDocumentPathsUseOverlayDeclarationDirectory(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
main := filepath.Join(root, "notarius.yml")
|
||||
if err := os.WriteFile(main, []byte("version: 5\n"), 0o600); err != nil {
|
||||
if err := os.WriteFile(main, []byte("version: 6\n"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(overlays, "development.yml"), []byte("output: {directory: ./overlay-output}\n"), 0o600); err != nil {
|
||||
@@ -220,7 +220,7 @@ func TestDocumentLoadDoesNotFallBackToLegacyProfileDirectory(t *testing.T) {
|
||||
|
||||
root := t.TempDir()
|
||||
main := filepath.Join(root, "notarius.yml")
|
||||
if err := os.WriteFile(main, []byte("version: 5\n"), 0o600); err != nil {
|
||||
if err := os.WriteFile(main, []byte("version: 6\n"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
legacy := filepath.Join(root, "profiles", "development.yml")
|
||||
@@ -242,7 +242,7 @@ func TestDocumentPathsKeepEmptyCacheDirectoriesAndAbsolutePaths(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
configPath := filepath.Join(root, "notarius.yml")
|
||||
abs := filepath.Join(t.TempDir(), "outside.txt")
|
||||
if err := os.WriteFile(configPath, []byte("version: 5\ncache:\n chunk_plans: {directory: ''}\n checkpoints: {directory: ''}\npipelines:\n main:\n input: {module: input}\n references:\n outside: {path: "+abs+"}\n"), 0o600); err != nil {
|
||||
if err := os.WriteFile(configPath, []byte("version: 6\ncache:\n chunk_plans: {directory: ''}\n checkpoints: {directory: ''}\npipelines:\n main:\n input: {module: input}\n references:\n outside: {path: "+abs+"}\n"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
loaded, err := loadConfig(configPath, LoadOptions{})
|
||||
|
||||
Reference in New Issue
Block a user