]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/activitypub/helpers.ts
Merge branch 'release/v1.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / activitypub / helpers.ts
index 61084624784674585b1b99ab6c53e4c967238550..365d0e1aefeba3422484148cc3d413b26cf325c2 100644 (file)
@@ -2,7 +2,7 @@
 
 import 'mocha'
 import { expect } from 'chai'
-import { buildRequestStub } from '../../utils'
+import { buildRequestStub } from '../../../../shared/extra-utils/miscs/stubs'
 import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
 import { cloneDeep } from 'lodash'
 import { buildSignedActivity } from '../../../helpers/activitypub'
@@ -91,7 +91,7 @@ describe('Test activity pub helpers', function () {
       req.headers = mastodonObject.headers
       req.headers.signature = 'Signature ' + req.headers.signature
 
-      const parsed = parseHTTPSignature(req, 3600 * 365 * 3)
+      const parsed = parseHTTPSignature(req, 3600 * 1000 * 365 * 10)
       const publicKey = require('./json/mastodon/public-key.json').publicKey
 
       const actor = { publicKey }
@@ -110,7 +110,7 @@ describe('Test activity pub helpers', function () {
       req.headers = mastodonObject.headers
       req.headers.signature = 'Signature ' + req.headers.signature
 
-      const parsed = parseHTTPSignature(req, 3600 * 365 * 3)
+      const parsed = parseHTTPSignature(req, 3600 * 1000 * 365 * 10)
       const publicKey = require('./json/mastodon/bad-public-key.json').publicKey
 
       const actor = { publicKey }
@@ -150,7 +150,7 @@ describe('Test activity pub helpers', function () {
 
       let errored = false
       try {
-        parseHTTPSignature(req, 3600 * 365 * 3)
+        parseHTTPSignature(req, 3600 * 1000 * 365 * 10)
       } catch {
         errored = true
       }
@@ -168,7 +168,7 @@ describe('Test activity pub helpers', function () {
       req.headers = mastodonObject.headers
       req.headers.signature = 'Signature ' + req.headers.signature
 
-      const parsed = parseHTTPSignature(req, 3600 * 365 * 3)
+      const parsed = parseHTTPSignature(req, 3600 * 1000 * 365 * 10)
       const publicKey = require('./json/mastodon/public-key.json').publicKey
 
       const actor = { publicKey }