mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-03 20:21:44 +00:00
Merge pull request #10794 from ahmetalpbalkan/win-cli/TestContainerApi-volume-path-fix
integration-cli: Generate unix-style volume paths for tests
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"reflect"
|
||||
"strings"
|
||||
"syscall"
|
||||
@@ -277,6 +278,12 @@ func makeRandomString(n int) string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// randomUnixTmpDirPath provides a temporary unix path with rand string appended.
|
||||
// does not create or checks if it exists.
|
||||
func randomUnixTmpDirPath(s string) string {
|
||||
return path.Join("/tmp", fmt.Sprintf("%s.%s", s, makeRandomString(10)))
|
||||
}
|
||||
|
||||
// Reads chunkSize bytes from reader after every interval.
|
||||
// Returns total read bytes.
|
||||
func consumeWithSpeed(reader io.Reader, chunkSize int, interval time.Duration, stop chan bool) (n int, err error) {
|
||||
|
||||
Reference in New Issue
Block a user