diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-06-10 00:07:56 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-06-10 00:07:56 +0200 |
| commit | daeb9127764fc9dd469294f755e277fdfca09a00 (patch) | |
| tree | ec5cd2b83e5f097527eaea985790e7ac49fa95cb /internal/rtree/shared_test.go | |
| parent | 6903a774ecbbd05596adda5e2b5e18d58dd3a8f9 (diff) | |
| download | gofu-daeb9127764fc9dd469294f755e277fdfca09a00.tar.gz | |
rtree: add support for multiple URLs per remote
This requires changing the index format, which I'm using as an
opportunity to:
- move from YAML to JSON (so I can maybe kill the YAML parser dependency
at some point)
- move the index file into standard XDG paths
Diffstat (limited to 'internal/rtree/shared_test.go')
| -rw-r--r-- | internal/rtree/shared_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/rtree/shared_test.go b/internal/rtree/shared_test.go index c435110..4810695 100644 --- a/internal/rtree/shared_test.go +++ b/internal/rtree/shared_test.go @@ -5,6 +5,7 @@ package rtree import ( "bytes" + "encoding/json" "errors" "fmt" "io" @@ -14,8 +15,6 @@ import ( "strings" "testing" - yaml "go.yaml.in/yaml/v3" - "github.com/majewsky/gofu/internal/cli" ) @@ -56,7 +55,7 @@ type Test struct { func (test Test) Run(t *testing.T) { //write index file, if any - IndexPath = filepath.Join(indexTmpDir, t.Name()+".yaml") + IndexPath = filepath.Join(indexTmpDir, t.Name()+".json") if test.Index.Repos != nil { err := test.Index.Write() if err != nil { @@ -94,7 +93,7 @@ func (test Test) Run(t *testing.T) { if test.ExpectIndex != nil { idx = test.ExpectIndex } - expectedIdxStr, err := yaml.Marshal(idx) + expectedIdxStr, err := json.MarshalIndent(idx, "", " ") if err != nil { t.Fatal(err.Error()) } |
