diff --git a/src/policies/anti-duplication-policy.test.ts b/src/policies/anti-duplication-policy.test.ts index 1e37f27..d04d258 100644 --- a/src/policies/anti-duplication-policy.test.ts +++ b/src/policies/anti-duplication-policy.test.ts @@ -6,12 +6,9 @@ import antiDuplicationPolicy from './anti-duplication-policy.ts'; Deno.test({ name: 'blocks events that post the same content too quickly', fn: async () => { + const opts = { databaseUrl: undefined }; const content = 'Spicy peppermint apricot mediterranean ginger carrot spiced juice edamame hummus'; - const opts = { - databaseUrl: `sqlite:///tmp/${crypto.randomUUID()}.sqlite3`, - }; - const msg1 = buildInputMessage({ event: buildEvent({ content }) }); assertEquals((await antiDuplicationPolicy(msg1, opts)).action, 'accept'); diff --git a/src/policies/rate-limit-policy.test.ts b/src/policies/rate-limit-policy.test.ts index 91f33d3..fa95bbe 100644 --- a/src/policies/rate-limit-policy.test.ts +++ b/src/policies/rate-limit-policy.test.ts @@ -6,10 +6,7 @@ import rateLimitPolicy from './rate-limit-policy.ts'; Deno.test({ name: 'blocks events from IPs that are publishing events too quickly', fn: async () => { - const opts = { - max: 4, - databaseUrl: `sqlite:///tmp/${crypto.randomUUID()}.sqlite3`, - }; + const opts = { max: 4, databaseUrl: undefined }; const msg = buildInputMessage({ sourceType: 'IP4', sourceInfo: '1.1.1.1', event: buildEvent() });