tests: don't use hard coded value for glusterd workdir

A number of test referred to /var/lib/glusterd,
they were adjusted to use "$GLUSTERD_WORKDIR".

(This has significance for proper test runs on non-Linux
platforms -- see the following #define in glusterfs.h:

  #ifdef GF_LINUX_HOST_OS
  #define GLUSTERD_DEFAULT_WORKDIR DATADIR "/lib/glusterd"
  #else
  #define GLUSTERD_DEFAULT_WORKDIR DATADIR "/db/glusterd"
  #endif

Ie. the glusterd workdir will typically be /var/db/glusterd
instead of /var/lib/glusterd on non-Linux platforms.)

BUG: 1476957
Change-Id: I69ce3e1bb7a0c14ea85b60adbf8205f9aca46cd5
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: https://review.gluster.org/17937
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Amar Tumballi <amarts@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
This commit is contained in:
Csaba Henk 2017-08-01 01:38:00 +02:00 committed by Jeff Darcy
parent f17eefb6d9
commit c7e5741f93
3 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ function build_dirs () {
}
function export_allow_this_host_ipv6 () {
printf "$EXPORT_ALLOW6\n" > /var/lib/glusterd/nfs/exports
printf "$EXPORT_ALLOW6\n" > "$GLUSTERD_WORKDIR"/nfs/exports
}
function export_allow_this_host () {

View File

@ -2,7 +2,7 @@
. $(dirname $0)/../include.rc
PEER_DIR=/var/lib/glusterd/peers
PEER_DIR="$GLUSTERD_WORKDIR"/peers
TEST mkdir -p $PEER_DIR
declare -i HOST_NUM=100

View File

@ -19,7 +19,7 @@ SSL_CA=$SSL_BASE/glusterfs.ca
cleanup;
rm -f $SSL_BASE/glusterfs.*
touch /var/lib/glusterd/secure-access
touch "$GLUSTERD_WORKDIR"/secure-access
TEST openssl genrsa -out $SSL_KEY 1024
TEST openssl req -new -x509 -key $SSL_KEY -subj /CN=Anyone -out $SSL_CERT