Resolve producer modes turn allowances cache controls and shared workers
This commit is contained in:
@@ -242,15 +242,15 @@ 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: 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 {
|
||||
if err := os.WriteFile(configPath, []byte("version: 6\ncache_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{})
|
||||
if err != nil {
|
||||
t.Fatalf("loadConfig() error = %v", err)
|
||||
}
|
||||
if loaded.Config.Cache.ChunkPlans.Directory != "" || loaded.Config.Cache.Checkpoints.Directory != "" {
|
||||
t.Fatalf("cache directories = %#v", loaded.Config.Cache)
|
||||
if loaded.Config.CacheDirectory == "" {
|
||||
t.Fatalf("cache directories = %#v", loaded.Config.CacheDirectory)
|
||||
}
|
||||
if got := loaded.Config.Pipelines["main"].References["outside"].Path; got != abs {
|
||||
t.Fatalf("absolute reference = %q", got)
|
||||
|
||||
Reference in New Issue
Block a user