Add API integration test suite with Postgres and ClickHouse coverage

This commit is contained in:
Mike Cao committed 2026-09-06 16:42:53 -07:00
1 parent 950ae63f87
commit e18769e8cf
59 files changed
+8971 -28

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import type { ApiClient } from '../client';
export interface Credentials {
username: string;
password: string;
}
export async function login(api: ApiClient, { username, password }: Credentials) {
const response = await api.post('/api/auth/login', { username, password });
if (response.status !== 200 || !response.body?.token) {
throw new Error(`Login failed for ${username} (${response.status}): ${response.text}`);
}
return response.body.token as string;
}