mirror of
https://github.com/lukaszraczylo/harness-sync.git
synced 2026-10-12 00:45:22 +00:00
test(apply): cover symlinks, force, dry-run, merge, errors, state round-trip
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/lukaszraczylo/harness-sync/internal/canonical"
|
||||
"github.com/lukaszraczylo/harness-sync/internal/gitx"
|
||||
"github.com/lukaszraczylo/harness-sync/internal/merge"
|
||||
"github.com/lukaszraczylo/harness-sync/internal/secrets"
|
||||
)
|
||||
|
||||
// Options configures a Run call.
|
||||
@@ -39,9 +40,14 @@ type Action struct {
|
||||
Note string
|
||||
}
|
||||
|
||||
// Run renders all adapters and writes their FileSets to disk.
|
||||
// Conflicts are recorded as <dest>.rej files; processing continues past conflicts.
|
||||
// Run renders all adapters and writes their FileSets to disk.
|
||||
// Conflicts are recorded as <dest>.rej files; processing continues past conflicts.
|
||||
func Run(opt Options) (*Report, error) {
|
||||
if err := canonical.SubstituteSecrets(opt.Bundle, secrets.OSEnv); err != nil {
|
||||
return nil, fmt.Errorf("env-var substitution: %w", err)
|
||||
}
|
||||
rep := &Report{}
|
||||
for _, ad := range opt.Adapters {
|
||||
files, err := ad.Render(opt.Bundle)
|
||||
|
||||
Reference in New Issue
Block a user