From ab6d79ab2b5ecfdbca8fc959a5862e4043a90dad Mon Sep 17 00:00:00 2001
From: Pawel Maniora <pmaniora@syncad.com>
Date: Wed, 14 Oct 2020 16:02:25 +0200
Subject: [PATCH] full sync tavern tests

---
 scripts/ci_start_api_smoketest.sh | 2 ++
 scripts/run_full_sync_tests.sh    | 9 +++++++++
 scripts/run_tests.sh              | 5 ++++-
 tests/tests_api                   | 2 +-
 tox.ini                           | 2 +-
 5 files changed, 17 insertions(+), 3 deletions(-)
 create mode 100755 scripts/run_full_sync_tests.sh

diff --git a/scripts/ci_start_api_smoketest.sh b/scripts/ci_start_api_smoketest.sh
index b85befd49..f8ec259da 100755
--- a/scripts/ci_start_api_smoketest.sh
+++ b/scripts/ci_start_api_smoketest.sh
@@ -5,6 +5,8 @@ pip3 install tox --user
 
 export HIVEMIND_ADDRESS=$1
 export HIVEMIND_PORT=$2
+export TAVERN_DIR="tests/tests_api/hivemind/tavern"
+
 echo Attempting to start tests on hivemind instance listeing on: $HIVEMIND_ADDRESS port: $HIVEMIND_PORT
 
 echo "Selected test group (if empty all will be executed): $3"
diff --git a/scripts/run_full_sync_tests.sh b/scripts/run_full_sync_tests.sh
new file mode 100755
index 000000000..6ee55b477
--- /dev/null
+++ b/scripts/run_full_sync_tests.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# script to run tavern tests for full sync hivemind node
+
+export TAVERN_DIR="tests/tests_api/hivemind/tavern_full_sync"
+
+SCRIPT=$(readlink -f "$0")
+
+$(dirname "$SCRIPT")/run_tests.sh "$@"
diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh
index c7ac8e64b..76f16a96a 100755
--- a/scripts/run_tests.sh
+++ b/scripts/run_tests.sh
@@ -63,7 +63,10 @@ pip3 install tox --user
 
 export HIVEMIND_ADDRESS=$1
 export HIVEMIND_PORT=$2
-
+if [ -z "$TAVERN_DIR" ]
+then
+  export TAVERN_DIR="tests/tests_api/hivemind/tavern"
+fi
 echo "Attempting to start tests on hivemind instance listening on: $HIVEMIND_ADDRESS port: $HIVEMIND_PORT"
 
 echo "Additional test options: ${@:3}"
diff --git a/tests/tests_api b/tests/tests_api
index 3f308b5d9..3fce32b50 160000
--- a/tests/tests_api
+++ b/tests/tests_api
@@ -1 +1 @@
-Subproject commit 3f308b5d98b924cde5e33c65ae64ba96cb3c786d
+Subproject commit 3fce32b5084b2f51fdb9e8608ca1e49539b86aa9
diff --git a/tox.ini b/tox.ini
index f475a0aa9..76156712b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,7 +9,7 @@ passenv =
   HIVEMIND_ADDRESS
   HIVEMIND_PORT
 
-changedir = tests/tests_api/hivemind/tavern
+changedir = {env:TAVERN_DIR}
 
 deps = 
   pytest
-- 
GitLab