2018-11-09 22:15:35 +00:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2018-10-29 14:16:36 +00:00
|
|
|
package testcontext_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"storj.io/storj/internal/testcontext"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestBasic(t *testing.T) {
|
|
|
|
ctx := testcontext.New(t)
|
|
|
|
defer ctx.Cleanup()
|
|
|
|
|
|
|
|
ctx.Go(func() error {
|
|
|
|
time.Sleep(time.Millisecond)
|
|
|
|
return nil
|
|
|
|
})
|
|
|
|
|
|
|
|
t.Log(ctx.Dir("a", "b", "c"))
|
|
|
|
t.Log(ctx.File("a", "w", "c.txt"))
|
|
|
|
}
|