Remove the secrets directory flag and update fixtures

This commit is contained in:
2026-11-23 14:23:53 +00:00
parent a4491a8517
commit 6175945230
30 changed files with 146 additions and 334 deletions

View File

@@ -7,6 +7,7 @@ import (
"testing"
"gitea.maximumdirect.net/eric/narratio/internal/config"
configkit "go.maximumdirect.net/configkit"
)
func TestLoadCommandConfigRetainsInitiallyLoadedPipeline(t *testing.T) {
@@ -15,20 +16,20 @@ func TestLoadCommandConfigRetainsInitiallyLoadedPipeline(t *testing.T) {
loadCalls := 0
deps := commandDependencies{
loadPipelineConfig: func(path string, opts config.PipelineLoadOptions) (*config.PipelineConfig, error) {
loaded, err := config.LoadPipelineWithOptions(path, opts)
loadPipelineSource: func(source configkit.Source, opts config.PipelineLoadOptions) (*config.PipelineConfig, error) {
loaded, err := config.LoadPipelineSourceWithOptions(source, opts)
if err != nil {
return nil, err
}
loadCalls++
data, err := os.ReadFile(path)
data, err := os.ReadFile(pipelinePath)
if err != nil {
return nil, err
}
changedRoot := workspaceRoot + "-changed"
updated := strings.ReplaceAll(string(data), workspaceRoot, changedRoot)
if err := os.WriteFile(path, []byte(updated), 0o644); err != nil {
if err := os.WriteFile(pipelinePath, []byte(updated), 0o644); err != nil {
return nil, err
}
return loaded, nil