Make NPM tests runnable by root
The tests can now be run as root. This is most likely required in some cases and it should not break things if they are run as root (e.g. inside a VM with no other users). NPM prevents the use of the root user (due to modules getting root access) and uses an unprivileged user to install the modules. As maxctrl has to generate the version information at install time, running `npm install` as root will fail due to missing privileges to the current working directory. To work around this, an explicit step was added. Also changed the maxadmin checks to maxctrl to remove the dependency on the socket file location being writable by non-root users (/var/run/maxscale/ might not be accessible to all users).
This commit is contained in:
@ -8,10 +8,10 @@ maxscaledir=$MAXSCALE_DIR
|
||||
|
||||
test -z "$MAXSCALE_DIR" && exit 1
|
||||
|
||||
for ((i=0;i<20;i++))
|
||||
for ((i=0;i<200;i++))
|
||||
do
|
||||
pkill '^maxscale$' || break
|
||||
sleep 0.5
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
# If it wasn't dead before, now it is
|
||||
|
Reference in New Issue
Block a user