diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2023-02-04 15:03:03 -0500 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2023-04-29 19:54:52 -0400 |
| commit | 5e05dc9fb9ad3ada91466da64d20ffbf063ca93d (patch) | |
| tree | 15edfc95169365b7c540bb68f978f56ed1e1da73 /internal/tests/integration/basic_test.go | |
| parent | 496bac6da308507760a70ccbce8da6fddee4c3ba (diff) | |
replace afero module
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'internal/tests/integration/basic_test.go')
| -rw-r--r-- | internal/tests/integration/basic_test.go | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/internal/tests/integration/basic_test.go b/internal/tests/integration/basic_test.go index d3a1d369..e4cb046e 100644 --- a/internal/tests/integration/basic_test.go +++ b/internal/tests/integration/basic_test.go @@ -8,17 +8,19 @@ import ( "github.com/hairyhenderson/gomplate/v4/internal/iohelpers" "gotest.tools/v3/assert" "gotest.tools/v3/assert/cmp" - testfs "gotest.tools/v3/fs" + tfs "gotest.tools/v3/fs" ) -func setupBasicTest(t *testing.T) *testfs.Dir { - tmpDir := testfs.NewDir(t, "gomplate-inttests", - testfs.WithFile("one", "hi\n", testfs.WithMode(0640)), - testfs.WithFile("two", "hello\n"), - testfs.WithFile("broken", "", testfs.WithMode(0000)), - testfs.WithDir("subdir", - testfs.WithFile("f1", "first\n", testfs.WithMode(0640)), - testfs.WithFile("f2", "second\n"), +func setupBasicTest(t *testing.T) *tfs.Dir { + t.Helper() + + tmpDir := tfs.NewDir(t, "gomplate-inttests", + tfs.WithFile("one", "hi\n", tfs.WithMode(0o640)), + tfs.WithFile("two", "hello\n"), + tfs.WithFile("broken", "", tfs.WithMode(0o000)), + tfs.WithDir("subdir", + tfs.WithFile("f1", "first\n", tfs.WithMode(0o640)), + tfs.WithFile("f2", "second\n"), ), ) t.Cleanup(tmpDir.Remove) @@ -180,7 +182,7 @@ func TestBasic_EmptyOutputSuppression(t *testing.T) { assertSuccess(t, o, e, err, "") _, err = os.Stat(out) - assert.Equal(t, true, os.IsNotExist(err)) + assert.ErrorIs(t, err, fs.ErrNotExist) } func TestBasic_RoutesInputsToProperOutputsWithChmod(t *testing.T) { |
