[Fuego] [PATCH 2/8] Add underscores to variables in spec.json

Guilherme Campos Camargo guicc at profusion.mobi
Tue Apr 3 17:56:47 UTC 2018


Add underscores to improve readability. Also reassign their names to
local variables on the shell script to reduce the name sizes on the
script.

Signed-off-by: Guilherme Campos Camargo <guicc at profusion.mobi>
---
 .../Functional.fuego_release_test/fuego_test.sh    | 23 +++++++++++-----------
 .../tests/Functional.fuego_release_test/spec.json  |  8 ++++----
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/engine/tests/Functional.fuego_release_test/fuego_test.sh b/engine/tests/Functional.fuego_release_test/fuego_test.sh
index bc17a04..6f88587 100755
--- a/engine/tests/Functional.fuego_release_test/fuego_test.sh
+++ b/engine/tests/Functional.fuego_release_test/fuego_test.sh
@@ -2,23 +2,22 @@
 
 readonly fuego_release_dir=fuego-release
 
+readonly fuego_repo="${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGO_REPO}"
+readonly fuego_branch="${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGO_BRANCH}"
+readonly fuego_core_repo="${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGO_CORE_REPO}"
+readonly fuego_core_branch="${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGO_CORE_BRANCH}"
+
 function test_build {
     if [ -d ${fuego_release_dir} ]; then
         rm -r ${fuego_release_dir}
     fi
-    echo "Cloning fuego from \
-        ${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOREPO}:${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOBRANCH}"
-    git clone --depth 1 --single-branch \
-        --branch "${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOBRANCH}" \
-        "${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOREPO}" \
-        "${fuego_release_dir}/fuego"
+    echo "Cloning fuego from ${fuego_repo}:${fuego_branch}"
+    git clone --depth 1 --single-branch --branch "${fuego_branch}" \
+        "${fuego_repo}" "${fuego_release_dir}/fuego"
 
-    echo "Cloning fuego-core from \
-        ${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOCOREREPO}:${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOCOREBRANCH}"
-    git clone --depth 1 --single-branch \
-        --branch "${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOCOREBRANCH}" \
-        "${FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGOCOREREPO}" \
-        "${fuego_release_dir}/fuego-core"
+    echo "Cloning fuego-core from ${fuego_core_repo}:${fuego_core_branch}"
+    git clone --depth 1 --single-branch --branch "${fuego_core_branch}" \
+        "${fuego_core_repo}" "${fuego_release_dir}/fuego-core"
     cd -
 }
 
diff --git a/engine/tests/Functional.fuego_release_test/spec.json b/engine/tests/Functional.fuego_release_test/spec.json
index 0ae17a8..08261cc 100644
--- a/engine/tests/Functional.fuego_release_test/spec.json
+++ b/engine/tests/Functional.fuego_release_test/spec.json
@@ -2,10 +2,10 @@
     "testName": "Functional.fuego_release_test",
     "specs": {
         "default": {
-            "FUEGOREPO":"https://bitbucket.org/tbird20d/fuego",
-            "FUEGOBRANCH":"master",
-            "FUEGOCOREREPO":"https://bitbucket.org/tbird20d/fuego-core",
-            "FUEGOCOREBRANCH":"master"
+            "FUEGO_REPO":"https://bitbucket.org/tbird20d/fuego",
+            "FUEGO_BRANCH":"master",
+            "FUEGO_CORE_REPO":"https://bitbucket.org/tbird20d/fuego-core",
+            "FUEGO_CORE_BRANCH":"master"
         }
     }
 }
-- 
2.16.3



More information about the Fuego mailing list