Skip to content

Commit

Permalink
Add test for disabled_filesystems=LocalFilestytem
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed Oct 23, 2024
1 parent 92feadd commit 622b54c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/regression/expected/non_superuser.out
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ ERROR: permission denied for function install_extension
SELECT * FROM duckdb.cache('some hacky sql', 'some more hacky sql');
ERROR: permission denied for function cache
SET duckdb.force_execution = true;
-- read_csv from the local filesystem should be disallowed
SELECT count("sepal.length") FROM read_csv('../../data/iris.csv') AS ("sepal.length" FLOAT);
ERROR: (PGDuckDB/CreatePlan) Prepared query returned an error: 'Permission Error: File system LocalFileSystem has been disabled by configuration
-- Should fail because DuckDB execution is not allowed for this user
SET ROLE user3;
SELECT * FROM t;
Expand Down
2 changes: 2 additions & 0 deletions test/regression/sql/non_superuser.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ SELECT * FROM duckdb.install_extension('some hacky sql');
SELECT * FROM duckdb.cache('some hacky sql', 'some more hacky sql');
SET duckdb.force_execution = true;

-- read_csv from the local filesystem should be disallowed
SELECT count("sepal.length") FROM read_csv('../../data/iris.csv') AS ("sepal.length" FLOAT);
-- Should fail because DuckDB execution is not allowed for this user
SET ROLE user3;
SELECT * FROM t;
Expand Down

0 comments on commit 622b54c

Please sign in to comment.