Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set postgres enabled state via request body in E2E and drizzle next tests #1570

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/client/src/api/controlPlaneComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,12 @@ export type CreateDatabaseRequestBody = {
* @minLength 1
*/
region: string;
/**
* Enable postgres access for this database
*
* @default false
*/
postgresEnabled?: boolean;
/**
* The dedicated cluster where branches from this database will be created. Defaults to 'shared-cluster'.
*
Expand Down
3 changes: 1 addition & 2 deletions packages/plugin-client-drizzle/test/drizzle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
beforeAll(async () => {
await api.databases.createDatabase({
pathParams: { workspaceId: workspace, dbName: database },
body: { region, branchName: 'main' },
headers: { 'X-Features': 'feat-pgroll-migrations=1' }
body: { region, branchName: 'main', postgresEnabled: true }
});

await waitForReplication();
Expand Down
3 changes: 1 addition & 2 deletions test/utils/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ export async function setUpTestEnvironment(

const { databaseName: database } = await api.databases.createDatabase({
pathParams: { workspaceId: workspace, dbName: `sdk-integration-test-${prefix}-${id}` },
body: { region, defaultClusterID: clusterId },
headers: { 'X-Features': 'feat-pgroll-migrations=1' }
body: { region, defaultClusterID: clusterId, postgresEnabled: true }
});

const workspaceUrl = getHostUrl(host, 'workspaces').replace('{workspaceId}', workspace).replace('{region}', region);
Expand Down
Loading