From 7af4a60ec4ab00c1aff0b824b1433f0b2f9f7834 Mon Sep 17 00:00:00 2001
From: Felix Ableitner <me@nutomic.com>
Date: Thu, 10 Dec 2020 20:19:17 +0100
Subject: [PATCH] change dir to read config

---
 .drone.yml                                 |  1 +
 api_tests/prepare-drone-federation-test.sh | 13 ++++++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/.drone.yml b/.drone.yml
index 1e6544ec..7350b119 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -76,6 +76,7 @@ steps:
     commands:
       - cargo build
 
+  # TODO: lemmy config is missing
   - name: run federation tests
     image: node:15-buster-slim
     user: root
diff --git a/api_tests/prepare-drone-federation-test.sh b/api_tests/prepare-drone-federation-test.sh
index d8f66a12..96393f68 100755
--- a/api_tests/prepare-drone-federation-test.sh
+++ b/api_tests/prepare-drone-federation-test.sh
@@ -1,6 +1,9 @@
 #!/bin/bash
 set -e
 
+# change folder so the config can be read from the default location
+cd ..
+
 export LEMMY_JWT_SECRET=changeme
 export LEMMY_FEDERATION__ENABLED=true
 export LEMMY_TLS_ENABLED=false
@@ -18,7 +21,7 @@ LEMMY_HOSTNAME=lemmy-alpha:8541 \
   LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta,lemmy-gamma,lemmy-delta,lemmy-epsilon \
   LEMMY_SETUP__ADMIN_USERNAME=lemmy_alpha \
   LEMMY_SETUP__SITE_NAME=lemmy-alpha \
-  ../target/debug/lemmy_server &
+  target/debug/lemmy_server &
 
 echo "start beta"
 LEMMY_HOSTNAME=lemmy-beta:8551 \
@@ -27,7 +30,7 @@ LEMMY_HOSTNAME=lemmy-beta:8551 \
   LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-gamma,lemmy-delta,lemmy-epsilon \
   LEMMY_SETUP__ADMIN_USERNAME=lemmy_beta \
   LEMMY_SETUP__SITE_NAME=lemmy-beta \
-  ../target/debug/lemmy_server &
+  target/debug/lemmy_server &
 
 echo "start gamma"
 LEMMY_HOSTNAME=lemmy-gamma:8561 \
@@ -36,7 +39,7 @@ LEMMY_HOSTNAME=lemmy-gamma:8561 \
   LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-alpha,lemmy-beta,lemmy-delta,lemmy-epsilon \
   LEMMY_SETUP__ADMIN_USERNAME=lemmy_gamma \
   LEMMY_SETUP__SITE_NAME=lemmy-gamma \
-  ../target/debug/lemmy_server &
+  target/debug/lemmy_server &
 
 echo "start delta"
 # An instance with only an allowlist for beta
@@ -46,7 +49,7 @@ LEMMY_HOSTNAME=lemmy-delta:8571 \
   LEMMY_FEDERATION__ALLOWED_INSTANCES=lemmy-beta \
   LEMMY_SETUP__ADMIN_USERNAME=lemmy_delta \
   LEMMY_SETUP__SITE_NAME=lemmy-delta \
-  ../target/debug/lemmy_server &
+  target/debug/lemmy_server &
 
 echo "start epsilon"
 # An instance who has a blocklist, with lemmy-alpha blocked
@@ -56,7 +59,7 @@ LEMMY_HOSTNAME=lemmy-epsilon:8581 \
   LEMMY_FEDERATION__BLOCKED_INSTANCES=lemmy-alpha \
   LEMMY_SETUP__ADMIN_USERNAME=lemmy_epsilon \
   LEMMY_SETUP__SITE_NAME=lemmy-epsilon \
-  ../target/debug/lemmy_server &
+  target/debug/lemmy_server &
 
 echo "wait for all instances to start"
 while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
-- 
2.44.1