summaryrefslogtreecommitdiff
path: root/render_test.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2023-02-04 15:03:03 -0500
committerDave Henderson <dhenderson@gmail.com>2023-04-29 19:54:52 -0400
commit5e05dc9fb9ad3ada91466da64d20ffbf063ca93d (patch)
tree15edfc95169365b7c540bb68f978f56ed1e1da73 /render_test.go
parent496bac6da308507760a70ccbce8da6fddee4c3ba (diff)
replace afero module
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'render_test.go')
-rw-r--r--render_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/render_test.go b/render_test.go
index e7f03ac0..261a2591 100644
--- a/render_test.go
+++ b/render_test.go
@@ -10,16 +10,21 @@ import (
"testing"
"testing/fstest"
- "github.com/hairyhenderson/go-fsimpl"
"github.com/hairyhenderson/gomplate/v4/data"
+ "github.com/hairyhenderson/gomplate/v4/internal/datafs"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestRenderTemplate(t *testing.T) {
+ wd, _ := os.Getwd()
+ t.Cleanup(func() {
+ _ = os.Chdir(wd)
+ })
+ _ = os.Chdir("/")
+
fsys := fstest.MapFS{}
- ctx := ContextWithFSProvider(context.Background(),
- fsimpl.WrappedFSProvider(fsys, "mem"))
+ ctx := datafs.ContextWithFSProvider(context.Background(), datafs.WrappedFSProvider(fsys, "mem"))
// no options - built-in function
tr := NewRenderer(Options{})