storj/satellite/metabase/metabasetest/run_test.go

26 lines
593 B
Go
Raw Normal View History

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
package metabasetest_test
import (
"testing"
"github.com/stretchr/testify/require"
"storj.io/common/testcontext"
_ "storj.io/private/dbutil/cockroachutil" // register cockroach driver
"storj.io/storj/satellite/metabase"
"storj.io/storj/satellite/metabase/metabasetest"
)
func TestSetup(t *testing.T) {
metabasetest.Run(t, func(ctx *testcontext.Context, t *testing.T, db *metabase.DB) {
err := db.Ping(ctx)
require.NoError(t, err)
_, err = db.TestingGetState(ctx)
require.NoError(t, err)
})
}