Skip to content

Commit

Permalink
driver-adapters: fix getLogs rpc handler in test executor (#4297)
Browse files Browse the repository at this point in the history
Fixes 4 tests:

* `new::native_upsert::native_upsert::should_upsert_on_compound_id`
* `new::native_upsert::native_upsert::should_upsert_on_id`
* `new::native_upsert::native_upsert::should_upsert_on_single_unique`
* `new::native_upsert::native_upsert::should_upsert_on_unique_list`
  • Loading branch information
aqrln authored Sep 28, 2023
1 parent 743c426 commit f5cd0c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function main(): Promise<void> {
const state: Record<number, {
engine: engines.QueryEngineInstance,
adapter: ErrorCapturingDriverAdapter,
queryLogs: string[]
logs: string[]
}> = {}

async function handleRequest(method: string, params: unknown): Promise<unknown> {
Expand Down Expand Up @@ -177,7 +177,7 @@ async function handleRequest(method: string, params: unknown): Promise<unknown>
}

const castParams = params as GetLogsPayload
return state[castParams.schemaId].queryLogs ?? []
return state[castParams.schemaId].logs
}
default: {
throw new Error(`Unknown method: \`${method}\``)
Expand Down

0 comments on commit f5cd0c1

Please sign in to comment.