1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-26 23:53:19 +08:00

Merge pull request #4489 from ipfs/fix/sharness-docker

Fix sharness docker
This commit is contained in:
Whyrusleeping
2017-12-14 12:46:37 -08:00
committed by GitHub
3 changed files with 8 additions and 3 deletions

View File

@ -44,8 +44,7 @@ RUN set -x \
&& cd /tmp \ && cd /tmp \
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini \ && wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini \
&& chmod +x tini \ && chmod +x tini \
# Install them && mv su-exec/su-exec tini /sbin/ # Install them
&& mv su-exec/su-exec tini /sbin/
# Ports for Swarm TCP, Swarm uTP, API, Gateway, Swarm Websockets # Ports for Swarm TCP, Swarm uTP, API, Gateway, Swarm Websockets
EXPOSE 4001 EXPOSE 4001

View File

@ -1,5 +1,9 @@
# Generic test functions for go-ipfs # Generic test functions for go-ipfs
ansi_strip() {
sed 's/\x1b\[[0-9;]*m//g'
}
# Quote arguments for sh eval # Quote arguments for sh eval
shellquote() { shellquote() {
_space='' _space=''
@ -48,7 +52,7 @@ test_path_cmp() {
# This takes a Dockerfile, and a build context directory # This takes a Dockerfile, and a build context directory
docker_build() { docker_build() {
docker build --rm -f "$1" "$2" docker build --rm -f "$1" "$2" | ansi_strip
} }
# This takes an image as argument and writes a docker ID on stdout # This takes an image as argument and writes a docker ID on stdout

View File

@ -43,6 +43,8 @@ SHARNESS_LIB="lib/sharness/sharness.sh"
# Make sure the ipfs path is set, also set in test_init_ipfs but that # Make sure the ipfs path is set, also set in test_init_ipfs but that
# is not always used. # is not always used.
export IPFS_PATH="$(pwd)/.ipfs" export IPFS_PATH="$(pwd)/.ipfs"
# Ask programs to please not print ANSI codes
export TERM=dumb
TEST_OS="$(uname -s | tr '[a-z]' '[A-Z]')" TEST_OS="$(uname -s | tr '[a-z]' '[A-Z]')"