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

test: fix timezone-related inconsistencies in tests #9083

Merged
merged 2 commits into from
Jan 13, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,21 @@ test('response should include last seen at per environment correctly for a singl
featureName,
db.rawDatabase,
'default',
'2023-08-01 12:30:56',
'2023-08-01T12:30:56.000Z',
);

await insertLastSeenAt(
featureName,
db.rawDatabase,
'development',
'2023-08-01 12:30:56',
'2023-08-01T12:30:56.000Z',
);

await insertLastSeenAt(
featureName,
db.rawDatabase,
'production',
'2023-08-01 12:30:56',
'2023-08-01T12:30:56.000Z',
);

const { body } = await app.request
Expand Down
6 changes: 3 additions & 3 deletions src/lib/features/project/projects.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,19 @@ test('response should include last seen at per environment for multiple environm
'multiple-environment-last-seen-at',
db.rawDatabase,
'default',
'2023-10-01 12:32:56',
'2023-10-01T12:32:56.000Z',
);
await insertLastSeenAt(
'multiple-environment-last-seen-at',
db.rawDatabase,
'development',
'2023-10-01 12:34:56',
'2023-10-01T12:34:56.000Z',
);
await insertLastSeenAt(
'multiple-environment-last-seen-at',
db.rawDatabase,
'production',
'2023-10-01 12:33:56',
'2023-10-01T12:33:56.000Z',
);

const { body } = await appWithLastSeenRefactor.request
Expand Down
4 changes: 2 additions & 2 deletions src/test/e2e/helpers/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export const insertLastSeenAt = async (
featureName: string,
db: Knex,
environment: string = 'default',
date: string = '2023-10-01 12:34:56',
date: string = '2023-10-01T12:34:56.000Z',
): Promise<string> => {
try {
await db.raw(`INSERT INTO last_seen_at_metrics (feature_name, environment, last_seen_at)
Expand All @@ -467,7 +467,7 @@ export const insertFeatureEnvironmentsLastSeen = async (
featureName: string,
db: Knex,
environment: string = 'default',
date: string = '2022-05-01 12:34:56',
date: string = '2022-05-01T12:34:56.000Z',
): Promise<string> => {
await db.raw(`
INSERT INTO feature_environments (feature_name, environment, last_seen_at, enabled)
Expand Down
204 changes: 0 additions & 204 deletions src/test/e2e/licensed-users-backfill.test.ts

This file was deleted.

Loading