Skip to content

Commit 82af0f7

Browse files
VJ-yadavclaude
andcommitted
fix: add dialect to upstream validate tests after rebase
The upstream altimate-core-validate tests (PR #693) call execute() without dialect, but our PR made dialect a required field in the zod output type. Add explicit dialect: 'snowflake' to all test calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3c3eca5 commit 82af0f7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/opencode/test/altimate/tools/altimate-core-validate.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe("AltimateCoreValidateTool.execute", () => {
189189
})
190190

191191
const tool = await AltimateCoreValidateTool.init()
192-
const result = await tool.execute({ sql: "SELECT 1" }, ctx as any)
192+
const result = await tool.execute({ sql: "SELECT 1", dialect: "snowflake" }, ctx as any)
193193

194194
// The engine ran, so success should be true.
195195
expect(result.metadata.success).toBe(true)
@@ -211,6 +211,7 @@ describe("AltimateCoreValidateTool.execute", () => {
211211
const result = await tool.execute(
212212
{
213213
sql: "SELECT id FROM users",
214+
dialect: "snowflake",
214215
schema_context: {
215216
users: { id: "INTEGER", name: "VARCHAR" },
216217
},
@@ -233,7 +234,7 @@ describe("AltimateCoreValidateTool.execute", () => {
233234

234235
const tool = await AltimateCoreValidateTool.init()
235236
const result = await tool.execute(
236-
{ sql: "SELECT 1", schema_path: "/tmp/schema.yaml" },
237+
{ sql: "SELECT 1", dialect: "snowflake", schema_path: "/tmp/schema.yaml" },
237238
ctx as any,
238239
)
239240

@@ -247,7 +248,7 @@ describe("AltimateCoreValidateTool.execute", () => {
247248
})
248249

249250
const tool = await AltimateCoreValidateTool.init()
250-
const result = await tool.execute({ sql: "SELECT 1", schema_context: {} }, ctx as any)
251+
const result = await tool.execute({ sql: "SELECT 1", dialect: "snowflake", schema_context: {} }, ctx as any)
251252

252253
expect(result.metadata.has_schema).toBe(false)
253254
})
@@ -268,6 +269,7 @@ describe("AltimateCoreValidateTool.execute", () => {
268269
const result = await tool.execute(
269270
{
270271
sql: "SELECT xyz FROOM users",
272+
dialect: "snowflake",
271273
schema_context: { users: { id: "INTEGER" } },
272274
},
273275
ctx as any,
@@ -292,7 +294,7 @@ describe("AltimateCoreValidateTool.execute", () => {
292294
})
293295

294296
const tool = await AltimateCoreValidateTool.init()
295-
const result = await tool.execute({ sql: "SELECT 1" }, ctx as any)
297+
const result = await tool.execute({ sql: "SELECT 1", dialect: "snowflake" }, ctx as any)
296298

297299
expect(result.metadata.success).toBe(false)
298300
expect(result.metadata.error_class).toBe("engine_failure")
@@ -308,7 +310,7 @@ describe("AltimateCoreValidateTool.execute", () => {
308310
)
309311

310312
const tool = await AltimateCoreValidateTool.init()
311-
await tool.execute({ sql: "SELECT 1" }, ctx as any)
313+
await tool.execute({ sql: "SELECT 1", dialect: "snowflake" }, ctx as any)
312314

313315
expect(spy).toHaveBeenCalledTimes(1)
314316
spy.mockRestore()

0 commit comments

Comments
 (0)