X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Factivitypub%2Frefresher.ts;h=c717f1a307676ce0b0fecd90b43dc9d3aa24df2d;hb=cf21b2cbef61929177b9c09b5e017c3b7eb8535d;hp=232c5d82341a75d3754aaea140c3319a3af4edf1;hpb=7024e9120b381b5b3201212f5a18f5cdc14e15ff;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts index 232c5d823..c717f1a30 100644 --- a/server/tests/api/activitypub/refresher.ts +++ b/server/tests/api/activitypub/refresher.ts @@ -24,6 +24,7 @@ import { } from '../../../../shared/extra-utils' import { getAccount } from '../../../../shared/extra-utils/users/accounts' import { VideoPlaylistPrivacy } from '../../../../shared/models/videos' +import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' describe('Test AP refresher', function () { let servers: ServerInfo[] = [] @@ -86,8 +87,8 @@ describe('Test AP refresher', function () { await waitJobs(servers) - await getVideo(servers[0].url, videoUUID1, 404) - await getVideo(servers[0].url, videoUUID2, 200) + await getVideo(servers[0].url, videoUUID1, HttpStatusCode.NOT_FOUND_404) + await getVideo(servers[0].url, videoUUID2, HttpStatusCode.OK_200) }) it('Should not update a remote video if the remote instance is down', async function () { @@ -106,7 +107,7 @@ describe('Test AP refresher', function () { await reRunServer(servers[1]) - await getVideo(servers[0].url, videoUUID3, 200) + await getVideo(servers[0].url, videoUUID3, HttpStatusCode.OK_200) }) }) @@ -126,8 +127,8 @@ describe('Test AP refresher', function () { await waitJobs(servers) - await getAccount(servers[0].url, 'user1@localhost:' + servers[1].port, 200) - await getAccount(servers[0].url, 'user2@localhost:' + servers[1].port, 404) + await getAccount(servers[0].url, 'user1@localhost:' + servers[1].port, HttpStatusCode.OK_200) + await getAccount(servers[0].url, 'user2@localhost:' + servers[1].port, HttpStatusCode.NOT_FOUND_404) }) }) @@ -146,8 +147,8 @@ describe('Test AP refresher', function () { await waitJobs(servers) - await getVideoPlaylist(servers[0].url, playlistUUID1, 200) - await getVideoPlaylist(servers[0].url, playlistUUID2, 404) + await getVideoPlaylist(servers[0].url, playlistUUID1, HttpStatusCode.OK_200) + await getVideoPlaylist(servers[0].url, playlistUUID2, HttpStatusCode.NOT_FOUND_404) }) })