Skip to content

Commit

Permalink
Merge branch 'main' into renovate-external-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
solaris007 authored Jan 6, 2025
2 parents 5a6c159 + 365870e commit 300c27f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const schema = new SchemaBuilder(KeyEvent, KeyEventCollection)
.addAttribute('time', {
type: 'string',
required: true,
default: () => new Date().toISOString(),
validate: (value) => isIsoDate(value),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const apiKeys = [
{
name: 'Test API Key 3',
expiresAt: '2025-10-09T19:21:55.834Z',
hashedApiKey: 'some-key-2',
hashedApiKey: 'some-key-3',
imsOrgId: 'org-1@AdobeOrg',
imsUserId: 'user-1',
scopes: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const importJobs = [
{
importJobId: '021cbb7d-0772-45c6-967c-86a0a598b7dd',
importQueueId: 'Q-123',
hashedApiKey: '1234',
hashedApiKey: 'some-key-1',
baseURL: 'https://example-1.com/cars',
startedAt: '2023-12-06T08:17:41.467Z',
status: ImportJob.ImportJobStatus.RUNNING,
Expand All @@ -32,7 +32,7 @@ const importJobs = [
{
importJobId: '72113a4d-ca45-4c35-bd2e-29bb0ec03435',
importQueueId: 'Q-321',
hashedApiKey: '4321',
hashedApiKey: 'some-key-1',
baseURL: 'https://example-2.com/cars',
startedAt: '2023-11-15T01:22:05.000Z',
status: ImportJob.ImportJobStatus.FAILED,
Expand All @@ -48,7 +48,7 @@ const importJobs = [
{
importJobId: '78e1f8de-661a-418b-bd80-24589a10b5ce',
importQueueId: 'Q-213',
hashedApiKey: '4231',
hashedApiKey: 'some-key-2',
baseURL: 'https://example-3.com/',
startedAt: '2023-11-15T03:46:40.000Z',
endedAt: '2023-11-15T03:49:13.000Z',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import chaiAsPromised from 'chai-as-promised';

import { getDataAccess } from '../util/db.js';
import { seedDatabase } from '../util/seed.js';
import { ImportJobStatus } from '../../../src/index.js';

use(chaiAsPromised);

Expand Down Expand Up @@ -121,13 +122,14 @@ describe('ImportJob IT', async () => {
});

it('gets all import jobs by status', async () => {
const sampleImportJob = sampleData.importJobs[0];
const importJobs = await ImportJob.allByStatus(sampleImportJob.getStatus());
const importJobs = await ImportJob.allByStatus(ImportJobStatus.COMPLETE);

expect(importJobs).to.be.an('array');
expect(importJobs.length).to.equal(2);
expect(importJobs[0].getId()).to.equal(sampleData.importJobs[0].getId());
importJobs.forEach((importJob) => {
checkImportJob(importJob);
expect(importJob.getStatus()).to.equal(sampleImportJob.getStatus());
expect(importJob.getStatus()).to.equal(ImportJobStatus.COMPLETE);
});
});

Expand Down

0 comments on commit 300c27f

Please sign in to comment.