go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/sdk/apputil/main_test.go (about)

     1  /*
     2  
     3  Copyright (c) 2023 - Present. Will Charczuk. All rights reserved.
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file at the root of the repository.
     5  
     6  */
     7  
     8  package apputil
     9  
    10  import (
    11  	"context"
    12  	"testing"
    13  
    14  	"go.charczuk.com/sdk/db"
    15  	"go.charczuk.com/sdk/logutil"
    16  	"go.charczuk.com/sdk/testutil"
    17  )
    18  
    19  func TestMain(m *testing.M) {
    20  	testutil.New(m,
    21  		testutil.OptWithDefaultDB(
    22  			db.OptLog(logutil.New()),
    23  		),
    24  		testutil.OptBefore(
    25  			func(ctx context.Context) error {
    26  				return MigrationSuite().Apply(ctx, testutil.DefaultDB())
    27  			},
    28  		),
    29  	).Run()
    30  }