1
0
mirror of https://github.com/tianon/gosu.git synced 2025-04-18 19:04:06 +03:00

Run tests with an explicit "--init=false" to counteract dockerd being run with --init and skewing our tests

This commit is contained in:
Tianon Gravi 2020-03-30 16:02:50 -07:00
parent 45200f77b4
commit 789b12ebe1

View File

@ -35,7 +35,8 @@ trap - EXIT
trap "docker rm -f '$base' > /dev/null; docker rmi -f '$img' > /dev/null" EXIT
docker run -d --name "$base" "$img" gosu root sleep 1000
# using explicit "--init=false" in case dockerd is running with "--init" (because that will skew our process numbers)
docker run -d --init=false --name "$base" "$img" gosu root sleep 1000
sleep 1 # give it plenty of time to get through "gosu" and into the "sleep"
[ "$(docker top "$base" | wc -l)" = 2 ]
# "docker top" should have only two lines