Skip to content

Commit c981e4a

Browse files
committed
add tests
1 parent ba08828 commit c981e4a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/sql/open_prompt.test

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# name: test/sql/rusty_quack.test
2+
# description: test rusty_quack extension
3+
# group: [quack]
4+
5+
# Before we load the extension, this will fail
6+
statement error
7+
SELECT open_prompt('error');
8+
----
9+
Catalog Error: Scalar Function with name open_prompt does not exist!
10+
11+
# Require statement will ensure the extension is loaded from now on
12+
require open_prompt
13+
14+
# Confirm the extension works by setting a secret
15+
query I
16+
CREATE SECRET IF NOT EXISTS open_prompt (
17+
TYPE open_prompt,
18+
PROVIDER config,
19+
api_token 'xxxxx',
20+
api_url 'https://api.groq.com/openai/v1/chat/completions',
21+
model_name 'llama-3.3-70b-versatile',
22+
api_timeout '30'
23+
);
24+
----
25+
true
26+
27+
# Confirm the secret exists
28+
query I
29+
SELECT name FROM duckdb_secrets() WHERE name = 'open_prompt' ;
30+
----
31+
open_prompt

0 commit comments

Comments
 (0)