summaryrefslogtreecommitdiff
path: root/internal/rtree/shared_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rtree/shared_test.go')
-rw-r--r--internal/rtree/shared_test.go7
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())
}