mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-19 16:16:45 +00:00
fix(ci): copy connection-types in docker image and align auto-commit tests
This commit is contained in:
@@ -794,6 +794,8 @@ describe("queryStore hidden primary key editing", () => {
|
||||
const { useQueryStore } = await import("@/stores/queryStore");
|
||||
const store = useQueryStore();
|
||||
const tabId = store.createTab("oracle-1", "ORCL", "Query");
|
||||
// Tabs default to auto-commit; exercise the explicit manual-transaction path.
|
||||
store.setAutoCommit(tabId, false);
|
||||
const execution = store.executeTabSql(tabId, "SELECT t.* FROM APP.WIDE_TABLE t");
|
||||
|
||||
await vi.waitFor(() => expect(listIndexes).toHaveBeenCalled());
|
||||
@@ -830,6 +832,8 @@ describe("queryStore hidden primary key editing", () => {
|
||||
const { useQueryStore } = await import("@/stores/queryStore");
|
||||
const store = useQueryStore();
|
||||
const tabId = store.createTab("oracle-1", "ORCL", "Query");
|
||||
// Tabs default to auto-commit; exercise the explicit manual-transaction path.
|
||||
store.setAutoCommit(tabId, false);
|
||||
const execution = store.executeTabSql(tabId, "SELECT t.* FROM APP.WIDE_TABLE t");
|
||||
|
||||
await vi.waitFor(() => expect(listIndexes).toHaveBeenCalled());
|
||||
|
||||
@@ -102,6 +102,8 @@ describe("queryStore manual transaction expiry recovery", () => {
|
||||
const { useQueryStore } = await import("@/stores/queryStore");
|
||||
const store = useQueryStore();
|
||||
const tabId = store.createTab("oracle-1", "ORCL", "Query", "query", "APP");
|
||||
// Tabs default to auto-commit; the expiry recovery path only applies to manual transactions.
|
||||
store.setAutoCommit(tabId, false);
|
||||
|
||||
await store.executeTabSql(tabId, "UPDATE USERS SET ACTIVE = 1");
|
||||
await store.executeTabSql(tabId, "UPDATE USERS SET ACTIVE = 1");
|
||||
|
||||
@@ -64,7 +64,11 @@ RUN case "$TARGETARCH" in \
|
||||
|
||||
# Copy real sources and rebuild (only application code recompiles)
|
||||
COPY crates/ crates/
|
||||
# dbx-core's build.rs embeds plugins/dialects (SQL dialects) and
|
||||
# plugins/connection-types (database manifest + DatabaseType enum);
|
||||
# either directory missing makes the build script panic.
|
||||
COPY plugins/dialects/ plugins/dialects/
|
||||
COPY plugins/connection-types/ plugins/connection-types/
|
||||
|
||||
# Docker COPY preserves original file timestamps, which may be older than the
|
||||
# dummy-source binary compiled above. Touch all .rs files so cargo detects the
|
||||
|
||||
+2
-2
@@ -296,7 +296,7 @@ test("external SQL file paths persist with open query tabs", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("legacy Oracle query tabs restore with the manual transaction default", async () => {
|
||||
test("legacy Oracle query tabs restore with the auto-commit default", async () => {
|
||||
const restoreStorage = installMemoryStorage();
|
||||
try {
|
||||
setActivePinia(createPinia());
|
||||
@@ -317,7 +317,7 @@ test("legacy Oracle query tabs restore with the manual transaction default", asy
|
||||
store = useQueryStore();
|
||||
await store.initOpenTabs();
|
||||
|
||||
assert.equal(store.tabs.find((tab) => tab.id === tabId)?.autoCommit, false);
|
||||
assert.equal(store.tabs.find((tab) => tab.id === tabId)?.autoCommit, true);
|
||||
} finally {
|
||||
restoreStorage();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user