summaryrefslogtreecommitdiff
path: root/tests/libtest.sh
diff options
context:
space:
mode:
authorJonathan Lebon <jonathan@jlebon.com>2018-03-14 10:36:48 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-16 19:21:31 +0000
commit4e4436beec35f4f48d9750fa39f0a3d7fa94de7e (patch)
treecd6083b7d63e522b2cc5f02b717494c095a0b6f1 /tests/libtest.sh
parent296ef25e12d1c4a49e98b3f9e0a86a31b3762a98 (diff)
downloadostree-4e4436beec35f4f48d9750fa39f0a3d7fa94de7e.tar.gz
lib/fetcher: Allow clients to append to User-Agent
We do already have `http-headers`, which potentially could be used to allow clients to completely override the field, but it seems like the more common use case is simply to append. Closes: #1496 Approved by: cgwalters
Diffstat (limited to 'tests/libtest.sh')
-rwxr-xr-xtests/libtest.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/libtest.sh b/tests/libtest.sh
index 9591a88f..586bf9ef 100755
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -234,10 +234,9 @@ ostree_repo_init() {
# The original one; use setup_fake_remote_repo2 for newer code,
# down the line we'll try to port tests.
setup_fake_remote_repo1() {
- mode=$1
- commit_opts=${2:-}
- args=${3:-}
- shift
+ mode=$1; shift
+ commit_opts=${1:-}
+ [ $# -eq 0 ] || shift
oldpwd=`pwd`
mkdir ostree-srv
cd ostree-srv
@@ -263,7 +262,7 @@ setup_fake_remote_repo1() {
mkdir ${test_tmpdir}/httpd
cd httpd
ln -s ${test_tmpdir}/ostree-srv ostree
- ${OSTREE_HTTPD} --autoexit --log-file $(pwd)/httpd.log --daemonize -p ${test_tmpdir}/httpd-port $args
+ ${OSTREE_HTTPD} --autoexit --log-file $(pwd)/httpd.log --daemonize -p ${test_tmpdir}/httpd-port "$@"
port=$(cat ${test_tmpdir}/httpd-port)
echo "http://127.0.0.1:${port}" > ${test_tmpdir}/httpd-address
cd ${oldpwd}