github.com/moby/docker@v26.1.3+incompatible/internal/test/suite/interfaces.go (about)

     1  package suite
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  )
     7  
     8  // SetupAllSuite has a SetupSuite method, which will run before the
     9  // tests in the suite are run.
    10  type SetupAllSuite interface {
    11  	SetUpSuite(context.Context, *testing.T)
    12  }
    13  
    14  // SetupTestSuite has a SetupTest method, which will run before each
    15  // test in the suite.
    16  type SetupTestSuite interface {
    17  	SetUpTest(context.Context, *testing.T)
    18  }
    19  
    20  // TearDownAllSuite has a TearDownSuite method, which will run after
    21  // all the tests in the suite have been run.
    22  type TearDownAllSuite interface {
    23  	TearDownSuite(context.Context, *testing.T)
    24  }
    25  
    26  // TearDownTestSuite has a TearDownTest method, which will run after
    27  // each test in the suite.
    28  type TearDownTestSuite interface {
    29  	TearDownTest(context.Context, *testing.T)
    30  }
    31  
    32  // TimeoutTestSuite has a OnTimeout method, which will run after
    33  // a single test times out after a period specified by -timeout flag.
    34  type TimeoutTestSuite interface {
    35  	OnTimeout()
    36  }