Adding unfollows.

This commit is contained in:
Dessalines 2020-12-17 21:10:20 -05:00
parent 6cc148f6a6
commit 5c266302c5
2 changed files with 8 additions and 4 deletions

View file

@ -63,14 +63,13 @@ steps:
- mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server - mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
- name: run federation tests - name: run federation tests
image: node:15.4.0 image: node:15-alpine3.12
environment: environment:
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432 LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432
DO_WRITE_HOSTS_FILE: 1 DO_WRITE_HOSTS_FILE: 1
commands: commands:
- ls -la target/lemmy_server - ls -la target/lemmy_server
# - apk add bash curl postgresql-client - apk add bash curl postgresql-client
- apt-get update && apt-get install -y postgresql postgresql-contrib
- bash api_tests/prepare-drone-federation-test.sh - bash api_tests/prepare-drone-federation-test.sh
- cd api_tests/ - cd api_tests/
- yarn - yarn

View file

@ -35,14 +35,19 @@ beforeAll(async () => {
await setupLogins(); await setupLogins();
let search = await searchForBetaCommunity(alpha); let search = await searchForBetaCommunity(alpha);
betaCommunity = search.communities[0]; betaCommunity = search.communities[0];
await unfollows();
}); });
afterAll(async () => { afterAll(async () => {
await unfollows();
});
async function unfollows() {
await unfollowRemotes(alpha); await unfollowRemotes(alpha);
await unfollowRemotes(gamma); await unfollowRemotes(gamma);
await unfollowRemotes(delta); await unfollowRemotes(delta);
await unfollowRemotes(epsilon); await unfollowRemotes(epsilon);
}); }
function assertPostFederation( function assertPostFederation(
postOne: Post, postOne: Post,