-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2891 from kuzudb/fix-extension-load
Add API tests to load extension & fix Python API extension loading
- Loading branch information
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
tools/java_api/src/test/java/com/kuzudb/test/ExtensionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.kuzudb.java_test; | ||
|
||
import com.kuzudb.*; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class ExtensionTest extends TestBase { | ||
@Test | ||
void HttpfsInstallAndLoad() throws KuzuObjectRefDestroyedException { | ||
KuzuQueryResult result = conn.query("INSTALL httpfs"); | ||
assertTrue(result.isSuccess()); | ||
result.destroy(); | ||
// Skip loading the extension for now until the fix is in place | ||
// result = conn.query("LOAD EXTENSION httpfs"); | ||
// assertTrue(result.isSuccess()); | ||
// result.destroy(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { assert } = require("chai"); | ||
|
||
describe("Extension loading", () => { | ||
it("should install and load httpfs extension", async function () { | ||
await conn.query("INSTALL httpfs"); | ||
// Skip this test until the fix is in place | ||
// await conn.query("LOAD EXTENSION httpfs"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
def test_install_and_load_httpfs(establish_connection): | ||
conn, db = establish_connection | ||
conn.execute("INSTALL httpfs") | ||
conn.execute("LOAD EXTENSION httpfs") |