2
2
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:
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) 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)
} }
} }