summaryrefslogtreecommitdiff
path: root/data/datasource_merge_test.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2019-03-07 09:13:32 -0500
committerDave Henderson <dhenderson@gmail.com>2019-03-07 09:13:32 -0500
commitd16298ea4fc8bcbf16a023a6a9b9f3b48bb3e9e2 (patch)
tree9c7adad5d872b1ff9f9298403b1de2795de04e1a /data/datasource_merge_test.go
parent3bc0bb968836bb19389200e935b82670ea64d75d (diff)
Replacing uses of blang/vfs with spf13/afero
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'data/datasource_merge_test.go')
-rw-r--r--data/datasource_merge_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/data/datasource_merge_test.go b/data/datasource_merge_test.go
index b4ad7768..586d4dff 100644
--- a/data/datasource_merge_test.go
+++ b/data/datasource_merge_test.go
@@ -6,8 +6,8 @@ import (
"net/url"
"testing"
- "github.com/blang/vfs"
- "github.com/blang/vfs/memfs"
+ "github.com/spf13/afero"
+
"github.com/stretchr/testify/assert"
)
@@ -18,16 +18,16 @@ func TestReadMerge(t *testing.T) {
mergedContent := []byte("goodnight: moon\nhello: world\n")
- fs := memfs.Create()
+ fs := afero.NewMemMapFs()
_ = fs.Mkdir("/tmp", 0777)
- f, _ := vfs.Create(fs, "/tmp/jsonfile.json")
+ f, _ := fs.Create("/tmp/jsonfile.json")
_, _ = f.Write(jsonContent)
- f, _ = vfs.Create(fs, "/tmp/array.json")
+ f, _ = fs.Create("/tmp/array.json")
_, _ = f.Write(arrayContent)
- f, _ = vfs.Create(fs, "/tmp/yamlfile.yaml")
+ f, _ = fs.Create("/tmp/yamlfile.yaml")
_, _ = f.Write(yamlContent)
- f, _ = vfs.Create(fs, "/tmp/textfile.txt")
+ f, _ = fs.Create("/tmp/textfile.txt")
_, _ = f.Write([]byte(`plain text...`))
source := &Source{Alias: "foo", URL: mustParseURL("merge:file:///tmp/jsonfile.json|file:///tmp/yamlfile.yaml")}