From 5e05dc9fb9ad3ada91466da64d20ffbf063ca93d Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 4 Feb 2023 15:03:03 -0500 Subject: replace afero module Signed-off-by: Dave Henderson --- render_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'render_test.go') 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{}) -- cgit v1.2.3