mirror of
https://github.com/octoleo/restic.git
synced 2025-02-08 22:58:24 +00:00
s3: Exit test loop for minio server on success
This commit is contained in:
parent
73b296918b
commit
422c0dfb5e
@ -53,13 +53,12 @@ func runMinio(ctx context.Context, t testing.TB, dir, key, secret string) func()
|
|||||||
time.Sleep(200 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
|
||||||
c, err := net.Dial("tcp", "localhost:9000")
|
c, err := net.Dial("tcp", "localhost:9000")
|
||||||
if err != nil {
|
if err == nil {
|
||||||
continue
|
success = true
|
||||||
}
|
if err := c.Close(); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
success = true
|
}
|
||||||
if err := c.Close(); err != nil {
|
break
|
||||||
t.Fatal(err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user