test: introduce afero-based mock filesystem for hermetic tests

This commit is contained in:
2026-05-23 13:12:15 +01:00
parent 2334ed7922
commit 7bd70bfaeb
10 changed files with 379 additions and 47 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ go 1.25
require (
github.com/charmbracelet/huh v1.0.0
github.com/pelletier/go-toml/v2 v2.2.3
github.com/spf13/afero v1.15.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
gopkg.in/yaml.v3 v3.0.1
@@ -38,7 +39,7 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/text v0.28.0 // indirect
)