From 7162708c40aad4284dd8d28b4fdf252abf387949 Mon Sep 17 00:00:00 2001 From: DJensen94 <79864006+DJensen94@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:59:30 -0400 Subject: [PATCH] update tests update tests --- backend/src/tasks/test/search-sync.test.ts | 9 +++++++++ backend/src/tasks/test/shodan.test.ts | 4 +++- backend/test/vulnerabilities.test.ts | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/src/tasks/test/search-sync.test.ts b/backend/src/tasks/test/search-sync.test.ts index 47b4dbca..5e2a9793 100644 --- a/backend/src/tasks/test/search-sync.test.ts +++ b/backend/src/tasks/test/search-sync.test.ts @@ -35,6 +35,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-10-10') }).save(); @@ -59,6 +60,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-10-10') }).save(); @@ -84,6 +86,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-10-10') }).save(); @@ -109,6 +112,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-10-10') }).save(); @@ -133,6 +137,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-10-10') }).save(); @@ -165,6 +170,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-10-10') }).save(); @@ -191,6 +197,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-10-10') }).save(); @@ -209,6 +216,7 @@ describe('search_sync', () => { const domain = await Domain.create({ name: 'cisa.gov', organization, + isFceb: true, syncedAt: new Date('9999-09-19T19:57:32.346Z'), updatedAt: new Date('9999-09-20T19:57:32.346Z') }).save(); @@ -257,6 +265,7 @@ describe('search_sync', () => { Domain.create({ name: 'cisa-' + Math.random() + '.gov', organization, + isFceb: true, syncedAt: new Date('9999-09-19T19:57:32.346Z'), updatedAt: new Date('9999-09-20T19:57:32.346Z') }).save() diff --git a/backend/src/tasks/test/shodan.test.ts b/backend/src/tasks/test/shodan.test.ts index aca7d033..d2f3d456 100644 --- a/backend/src/tasks/test/shodan.test.ts +++ b/backend/src/tasks/test/shodan.test.ts @@ -207,7 +207,9 @@ describe('shodan', () => { updatedAt: null, createdAt: null, syncedAt: null, - name: null + name: null, + isFceb: null, + fromCidr: null })) ).toMatchSnapshot(); expect(domains.filter((e) => !e.organization).length).toEqual(0); diff --git a/backend/test/vulnerabilities.test.ts b/backend/test/vulnerabilities.test.ts index e402a944..fde000e4 100644 --- a/backend/test/vulnerabilities.test.ts +++ b/backend/test/vulnerabilities.test.ts @@ -37,6 +37,7 @@ describe('vulnerabilities', () => { }).save(); const domain = await Domain.create({ name: 'test-' + Math.random(), + isFceb: true, organization }).save(); const vulnerability = await Vulnerability.create({ @@ -45,6 +46,7 @@ describe('vulnerabilities', () => { }).save(); const domain2 = await Domain.create({ name: 'test-' + Math.random(), + isFceb: true, organization: organization2 }).save(); const vulnerability2 = await Vulnerability.create({