mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +00:00
unit-tests: allow running as user
This commit is contained in:
@@ -4,9 +4,16 @@
|
||||
ETCD_VER=v3.5.2
|
||||
DOWNLOAD_URL=https://storage.googleapis.com/etcd
|
||||
|
||||
if [ ! -e /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz ]; then
|
||||
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
|
||||
ARCH=""
|
||||
case $(uname -m) in
|
||||
x86_64) ARCH="amd64" ;;
|
||||
aarch64) ARCH="arm64" ;;
|
||||
*) echo "unsupported cpu arch"; exit 1 ;;
|
||||
esac
|
||||
|
||||
if [ ! -e /tmp/etcd-${ETCD_VER}-linux-$ARCH.tar.gz ]; then
|
||||
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-$ARCH.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-$ARCH.tar.gz
|
||||
fi
|
||||
|
||||
mkdir /srv/etcd
|
||||
tar xf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /srv/etcd --strip-components=1
|
||||
mkdir /tmp/aptly-etcd
|
||||
tar xf /tmp/etcd-${ETCD_VER}-linux-$ARCH.tar.gz -C /tmp/aptly-etcd --strip-components=1
|
||||
|
||||
@@ -16,7 +16,7 @@ finish()
|
||||
}
|
||||
trap finish INT
|
||||
|
||||
/srv/etcd/etcd --max-request-bytes '1073741824' --data-dir /tmp/etcd-data &
|
||||
/tmp/aptly-etcd/etcd --max-request-bytes '1073741824' --data-dir /tmp/aptly-etcd-data &
|
||||
echo $! > /tmp/etcd.pid
|
||||
etcdpid=`cat /tmp/etcd.pid`
|
||||
wait $etcdpid
|
||||
|
||||
Reference in New Issue
Block a user