Browse Source

add code for checking data path

ignazio 3 years ago
parent
commit
3c00613330
1 changed files with 11 additions and 8 deletions
  1. 11 8
      tests/network-tests/run-migration-tests.sh

+ 11 - 8
tests/network-tests/run-migration-tests.sh

@@ -229,14 +229,17 @@ function main {
 
     CONTAINER_ID=""
 
-    echo "**** CREATING EMPTY CHAINSPEC ****"
-    create_initial_config
-    create_chainspec_file
-    convert_chainspec
-    echo "**** EMPTY CHAINSPEC CREATED SUCCESSFULLY ****"
+    if ! [[ -d $DATA_PATH ]]; then
+	echo "**** CREATING EMPTY CHAINSPEC ****"
+	create_initial_config
+	create_chainspec_file
+	convert_chainspec
+	echo "**** EMPTY CHAINSPEC CREATED SUCCESSFULLY ****"
 
-    # use forkoff to update chainspec with the live state + update runtime code
-    # fork_off_init
+	# use forkoff to update chainspec with the live state + update runtime code
+	fork_off_init
+
+    fi
 
     echo "***** STARTING NODE WITH FORKED STATE *****"
     JOYSTREAM_NODE_TAG=$TARGET_RUNTIME_TAG
@@ -257,4 +260,4 @@ function main {
 
 # main entrypoint
 main
-cleanup
+trap cleanup EXIT