test: move test requires root privilege to ci_only group (#3419)

This test can't be run if we don't use root privilege.
This commit is contained in:
罗泽轩 2021-01-26 23:33:55 +08:00 committed by GitHub
parent a3c7c4098b
commit c2385c7d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 21 deletions

View File

@ -39,3 +39,24 @@ if ! echo "$out" | grep 'etcd cluster version 3.3.0 is less than the required ve
fi
echo "passed: properly handle the error when connecting to old etcd"
# It is forbidden to run apisix under the "/root" directory.
git checkout conf/config.yaml
mkdir /root/apisix
cp -r ./* /root/apisix
cd /root/apisix
make init
out=$(make run 2>&1 || true)
if ! echo "$out" | grep "Error: It is forbidden to run APISIX in the /root directory"; then
echo "failed: should echo It is forbidden to run APISIX in the /root directory"
exit 1
fi
cd -
echo "passed: successfully prohibit APISIX from running in the /root directory"
rm -rf /root/apisix

View File

@ -863,27 +863,6 @@ fi
echo "pass: uninitialized variable not found during writing access log (port_admin set)"
# It is forbidden to run apisix under the "/root" directory.
git checkout conf/config.yaml
mkdir /root/apisix
cp -r ./* /root/apisix
cd /root/apisix
make init
out=$(make run 2>&1 || true)
if ! echo "$out" | grep "Error: It is forbidden to run APISIX in the /root directory"; then
echo "failed: should echo It is forbidden to run APISIX in the /root directory"
exit 1
fi
cd -
echo "passed: successfully prohibit APISIX from running in the /root directory"
rm -rf /root/apisix
# check etcd while enable auth
git checkout conf/config.yaml