Skip to content

Commit a459d7a

Browse files
committed
test: fix tests
1 parent 8f67753 commit a459d7a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

internal/functions/new/new_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestNewCommand(t *testing.T) {
1616
// Setup in-memory fs
1717
fsys := afero.NewMemMapFs()
1818
// Run test
19-
assert.NoError(t, Run(context.Background(), "test-func", fsys))
19+
assert.NoError(t, Run(context.Background(), "test-func", AuthAccessModeAlways, fsys))
2020
// Validate output
2121
funcPath := filepath.Join(utils.FunctionsDir, "test-func", "index.ts")
2222
content, err := afero.ReadFile(fsys, funcPath)
@@ -41,22 +41,22 @@ func TestNewCommand(t *testing.T) {
4141
})
4242

4343
t.Run("throws error on malformed slug", func(t *testing.T) {
44-
assert.Error(t, Run(context.Background(), "@", afero.NewMemMapFs()))
44+
assert.Error(t, Run(context.Background(), "@", AuthAccessModeAlways, afero.NewMemMapFs()))
4545
})
4646

4747
t.Run("throws error on duplicate slug", func(t *testing.T) {
4848
// Setup in-memory fs
4949
fsys := afero.NewMemMapFs()
5050
funcPath := filepath.Join(utils.FunctionsDir, "test-func", "index.ts")
51-
require.NoError(t, afero.WriteFile(fsys, funcPath, []byte{}, 0644))
51+
require.NoError(t, afero.WriteFile(fsys, funcPath, []byte{}, 0o644))
5252
// Run test
53-
assert.Error(t, Run(context.Background(), "test-func", fsys))
53+
assert.Error(t, Run(context.Background(), "test-func", AuthAccessModeAlways, fsys))
5454
})
5555

5656
t.Run("throws error on permission denied", func(t *testing.T) {
5757
// Setup in-memory fs
5858
fsys := afero.NewReadOnlyFs(afero.NewMemMapFs())
5959
// Run test
60-
assert.Error(t, Run(context.Background(), "test-func", fsys))
60+
assert.Error(t, Run(context.Background(), "test-func", AuthAccessModeAlways, fsys))
6161
})
6262
}

0 commit comments

Comments
 (0)