2018-06-28 17:29:26 +00:00
|
|
|
package framework
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2018-06-28 19:55:53 +00:00
|
|
|
// TestCase is the interface which an E2E test case implements.
|
|
|
|
// It is not meant to be implemented directly, instead the struct should embed
|
|
|
|
// the 'framework.TC' struct
|
2018-06-28 17:29:26 +00:00
|
|
|
type TestCase interface {
|
|
|
|
internalTestCase
|
|
|
|
|
2018-06-28 19:55:53 +00:00
|
|
|
Name() string
|
2018-06-28 17:29:26 +00:00
|
|
|
T() *testing.T
|
|
|
|
SetT(*testing.T)
|
|
|
|
}
|
|
|
|
|
|
|
|
type internalTestCase interface {
|
|
|
|
setClusterInfo(*ClusterInfo)
|
|
|
|
}
|
|
|
|
|
2018-07-03 18:26:05 +00:00
|
|
|
// BeforeAllTests is used to define a method to be called before the execution
|
|
|
|
// of all tests.
|
|
|
|
type BeforeAllTests interface {
|
|
|
|
BeforeAll()
|
2018-06-28 17:29:26 +00:00
|
|
|
}
|
|
|
|
|
2018-07-03 18:26:05 +00:00
|
|
|
// AfterAllTests is used to define a method to be called after the execution of
|
|
|
|
// all tests.
|
|
|
|
type AfterAllTests interface {
|
|
|
|
AfterAll()
|
2018-06-28 17:29:26 +00:00
|
|
|
}
|
|
|
|
|
2018-07-03 18:26:05 +00:00
|
|
|
// BeforeEachTest is used to define a method to be called before each test.
|
|
|
|
type BeforeEachTest interface {
|
|
|
|
BeforeEach()
|
2018-06-28 17:29:26 +00:00
|
|
|
}
|
|
|
|
|
2018-07-03 18:26:05 +00:00
|
|
|
// AfterEachTest is used to degine a method to be called after each test.
|
|
|
|
type AfterEachTest interface {
|
|
|
|
AfterEach()
|
2018-06-28 17:29:26 +00:00
|
|
|
}
|