- const { response } = await makePOSTAPRequest(url, body, baseHttpSignature(), headers)
+ const { statusCode } = await makePOSTAPRequest(url, body, baseHttpSignature(), headers)
+ expect(statusCode).to.equal(HttpStatusCode.NO_CONTENT_204)
+ })
+
+ it('Should refresh the actor keys', async function () {
+ this.timeout(20000)
+
+ // Update keys of server 2 to invalid keys
+ // Server 1 should refresh the actor and fail
+ await setKeysOfServer(servers[1], servers[1], invalidKeys.publicKey, invalidKeys.privateKey)
+ await setUpdatedAtOfServer(servers[0], servers[1], '2015-07-17 22:00:00+00')
+
+ // Invalid peertube actor cache
+ killallServers([ servers[1] ])
+ await reRunServer(servers[1])