Merge pull request #5 from ebotzol/improvement

Improvement
diff --git a/git/client.sls b/git/client.sls
index 0ca54ea..e457770 100644
--- a/git/client.sls
+++ b/git/client.sls
@@ -1,5 +1,6 @@
 {%- from "git/map.jinja" import client with context %}
 {%- from "linux/map.jinja" import system with context %}
+
 {%- if client.enabled %}
 
 include:
@@ -12,18 +13,22 @@
 {%- for user in client.user %}
 
 set_git_{{ user.user.name }}_param_username:
-  cmd.run:
-  - name: sudo -u {{ user.user.name }} -H git config --global user.name "{{ user.user.get('full_name', user.user.name) }}"
-  - cwd: /
+  git.config_set:
+  - user: {{ user.user.name }}
+  - name: user.name
+  - value: "{{ user.user.get('full_name', user.user.name) }}"
+  - global: True
   - require:
     - user: system_user_{{ user.user.name }}
 
 {%- if user.user.email is defined %}
 
 set_git_{{ user.user.name }}_param_email:
-  cmd.run:
-  - name: sudo -u {{ user.user.name }} -H git config --global user.email "{{ user.user.email }}"
-  - cwd: /
+  git.config.set:
+  - user: {{ user.user.name }}
+  - name: user.email
+  - value: "{{ user.user.email }}"
+  - global: True
   - require:
     - user: system_user_{{ user.user.name }}
 
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 29fb975..b6654df 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -1,7 +1,9 @@
 #!/usr/bin/env bash
 
 set -e
-[ -n "$DEBUG" ] && set -x
+if [[ $DEBUG =~ ^(True|true|1|yes)$ ]]; then
+    set -x
+fi
 
 CURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 METADATA=${CURDIR}/../metadata.yml
@@ -22,7 +24,7 @@
 
 SALT_OPTS="${SALT_OPTS} --retcode-passthrough --local -c ${SALT_CONFIG_DIR} --log-file=/dev/null"
 
-if [ "x${SALT_VERSION}" != "x" ]; then
+if [ -n "${SALT_VERSION}" ]; then
     PIP_SALT_VERSION="==${SALT_VERSION}"
 fi