storj/internal/testcontext/context_test.go

25 lines
398 B
Go
Raw Normal View History

// 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"))
}