-
Notifications
You must be signed in to change notification settings - Fork 2k
/
duckdb_extensions.test
47 lines (36 loc) · 1.39 KB
/
duckdb_extensions.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# name: test/extension/duckdb_extensions.test
# description: Tests for the duckdb_extensions() table function
# group: [extension]
# This test assumes icu and json to be available in the LOCAL_EXTENSION_REPO and NOT linked into duckdb statically
# -> this should be the case for our autoloading tests where we have the local_extension_repo variable set
require-env LOCAL_EXTENSION_REPO
require no_extension_autoloading "EXPECTED: Test relies on explcit INSTALL and LOAD"
statement ok
PRAGMA enable_verification
# Set the repository to the correct one
statement ok
set custom_extension_repository='${LOCAL_EXTENSION_REPO}'
# Ensure we have a clean extension directory without any preinstalled extensions
statement ok
set extension_directory='__TEST_DIR__/duckdb_extensions'
require json
# json is statically linked
query II
SELECT extension_name, install_mode from duckdb_extensions() where extension_name='json'
----
json STATICALLY_LINKED
# now we install json (happens when users install extensions that are also statically loaded)
statement ok
install json
# json still shown as statically linked
query II
SELECT extension_name, install_mode from duckdb_extensions() where extension_name='json'
----
json STATICALLY_LINKED
statement ok
load json
# json still shown as statically linked
query II
SELECT extension_name, install_mode from duckdb_extensions() where extension_name='json'
----
json STATICALLY_LINKED