2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-02 03:42:31 +00:00

s3: Exit test loop for minio server on success

This commit is contained in:
Alexander Neumann 2017-06-11 14:38:16 +02:00
parent 73b296918b
commit 422c0dfb5e

View File

@ -53,13 +53,12 @@ func runMinio(ctx context.Context, t testing.TB, dir, key, secret string) func()
time.Sleep(200 * time.Millisecond)
c, err := net.Dial("tcp", "localhost:9000")
if err != nil {
continue
}
success = true
if err := c.Close(); err != nil {
t.Fatal(err)
if err == nil {
success = true
if err := c.Close(); err != nil {
t.Fatal(err)
}
break
}
}