From 8196a5c350127ab94b70ae783fdd1e2458d6598b Mon Sep 17 00:00:00 2001
From: Tobias Urdin <tobias@busybox.se>
Date: Tue, 6 Feb 2018 15:51:26 +0100
Subject: [PATCH] Remove PUPPET_MAJ_VERSION check for unit modules

The install_modules_unit.sh which is called by the
spec helper to install the modules for the unit
tests checks the PUPPET_MAJ_VERSION variable when
selecting the puppet base path.

The zuul jobs is not configured to give this env
variable so unit tests failed when using the puppet
base path for v3 which was /etc/puppet instead of
/etc/puppetlabs/code that is valid for v4 and v5.

We don't test v3 specifically so the check
should not be needed.

Change-Id: I6a9c53d58f05dfbb8646ad36d3bf5f6bad5588e1
---
 install_modules_unit.sh | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/install_modules_unit.sh b/install_modules_unit.sh
index 55994b88c..4602dfddd 100755
--- a/install_modules_unit.sh
+++ b/install_modules_unit.sh
@@ -11,12 +11,7 @@ if [ -n "${GEM_HOME}" ]; then
     export PATH=${PATH}:${GEM_BIN_DIR}
 fi
 
-if [ "${PUPPET_MAJ_VERSION}" = 4 ]; then
-  export PUPPET_BASE_PATH=/etc/puppetlabs/code
-else
-  export PUPPET_BASE_PATH=/etc/puppet
-fi
-
+export PUPPET_BASE_PATH=/etc/puppetlabs/code
 export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
 export PUPPETFILE_DIR=${PUPPETFILE_DIR:-${PUPPET_BASE_PATH}/modules}
 source $SCRIPT_DIR/functions