Skip to content

Commit

Permalink
feat: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
debrecenid committed Feb 27, 2024
1 parent cc2a664 commit 4d434df
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
2 changes: 0 additions & 2 deletions packages/core/db/dbFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ type FactoryPayload =
};

export const dbFactory = (payload: FactoryPayload) => {
console.log("DB Factory payload", payload);

const pool = new pg.Pool({
...payload,
});
Expand Down
8 changes: 0 additions & 8 deletions stacks/StorageStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
InstanceType,
Port,
SecurityGroup,
// SubnetType,
Vpc,
} from "aws-cdk-lib/aws-ec2";
import {
Expand All @@ -27,13 +26,6 @@ export function StorageStack({ stack }: StackContext) {

const vpc = new Vpc(stack, "vpc", {
natGateways: 1,
// subnetConfiguration: [
// {
// cidrMask: 24,
// name: "public",
// subnetType: SubnetType.PUBLIC,
// },
// ],
});

const rdsSecurtyGroup = new SecurityGroup(stack, "RdsSecurityGroupt", {
Expand Down
36 changes: 0 additions & 36 deletions tests/utils/testDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ export const [testDb] = dbFactory(
export const waitForTestItems = async (id: string, expectedCount: number = 2) =>
vi.waitFor(
async () => {
// const items = await testDb
// .select()
// .from(testItems)
// .where(eq(testItems.testId, id))
// .limit(expectedCount);
const items = await queryDb(
`SELECT * FROM test_items WHERE test_id = '${id}' LIMIT ${expectedCount}`,
);
Expand Down Expand Up @@ -57,15 +52,6 @@ export const waitForUsers = async ({
}: WaitForArgs) =>
vi.waitFor(
async () => {
// const items = await testDb
// .select()
// .from(users)
// .where(
// and(
// userId ? eq(users.id, userId) : undefined,
// teamId ? eq(users.teamId, teamId) : undefined,
// ),
// );
const items = await queryDb(
`SELECT * FROM users WHERE id = '${userId}' AND team_id = '${teamId}'`,
);
Expand All @@ -89,10 +75,6 @@ export const waitForIceBreakerThreads = async ({
}: WaitForArgs) =>
vi.waitFor(
async () => {
// const items = await testDb
// .select()
// .from(iceBreakerThreads)
// .where(teamId ? eq(iceBreakerThreads.teamId, teamId) : undefined);
const items = await queryDb(
`SELECT * FROM ice_breaker_threads WHERE team_id = '${teamId}'`,
);
Expand All @@ -117,15 +99,6 @@ export const waitForPresentIdeas = async ({
}: WaitForArgs) =>
vi.waitFor(
async () => {
// const items = await testDb
// .select()
// .from(presentIdeas)
// .where(
// and(
// userId ? eq(presentIdeas.userId, userId) : undefined,
// teamId ? eq(presentIdeas.teamId, teamId) : undefined,
// ),
// );
const items = await queryDb(
`SELECT * FROM present_ideas WHERE user_id = '${userId}' AND team_id = '${teamId}'`,
);
Expand All @@ -150,15 +123,6 @@ export const waitForSquadJoins = async ({
}: WaitForArgs) =>
vi.waitFor(
async () => {
// const items = await testDb
// .select()
// .from(squadJoins)
// .where(
// and(
// userId ? eq(squadJoins.userId, userId) : undefined,
// teamId ? eq(squadJoins.teamId, teamId) : undefined,
// ),
// );
const items = await queryDb(
`SELECT * FROM squad_joins WHERE user_id = '${userId}' AND team_id = '${teamId}'`,
);
Expand Down

0 comments on commit 4d434df

Please sign in to comment.