mirror of
https://github.com/rclone/rclone.git
synced 2026-10-27 13:58:42 -04:00
build: implement a framework for starting test servers during tests
Test servers are implemented by docker containers and run real servers for rclone to test against.
This commit is contained in:
1 parent
00d30ce0d7
commit
24ef00a258
24 files changed
+687
-7
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
stop() {
|
||||
if status ; then
|
||||
docker stop $NAME
|
||||
echo "$NAME stopped"
|
||||
fi
|
||||
}
|
||||
|
||||
status() {
|
||||
if docker ps --format "{{.Names}}" | grep ^${NAME}$ >/dev/null ; then
|
||||
echo "$NAME running"
|
||||
else
|
||||
echo "$NAME not running"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
docker_ip() {
|
||||
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $NAME
|
||||
}
|
||||
Reference in new issue
Block a user