Documentation ¶
Index ¶
- func AssertError(t *testing.T, actualResponse *httptest.ResponseRecorder, expectedErrorCode int, ...)
- type UnitTestSuite
- func (s *UnitTestSuite) DefaultConfig() configuration.RegistrationServiceConfig
- func (s *UnitTestSuite) OverrideApplicationDefault(opts ...testconfig.ToolchainConfigOption)
- func (s *UnitTestSuite) SetConfig(opts ...testconfig.ToolchainConfigOption) configuration.RegistrationServiceConfig
- func (s *UnitTestSuite) SetSecret(secret *corev1.Secret)
- func (s *UnitTestSuite) SetupDefaultApplication()
- func (s *UnitTestSuite) SetupSuite()
- func (s *UnitTestSuite) SetupTest()
- func (s *UnitTestSuite) TearDownSuite()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertError ¶
func AssertError(t *testing.T, actualResponse *httptest.ResponseRecorder, expectedErrorCode int, expectedMessageAndDetails ...string)
AssertError asserts that the provided response contains the expected error
Types ¶
type UnitTestSuite ¶
type UnitTestSuite struct { suite.Suite ConfigClient *test.FakeClient }
UnitTestSuite is the base test suite for unit tests.
func (*UnitTestSuite) DefaultConfig ¶
func (s *UnitTestSuite) DefaultConfig() configuration.RegistrationServiceConfig
func (*UnitTestSuite) OverrideApplicationDefault ¶
func (s *UnitTestSuite) OverrideApplicationDefault(opts ...testconfig.ToolchainConfigOption)
func (*UnitTestSuite) SetConfig ¶
func (s *UnitTestSuite) SetConfig(opts ...testconfig.ToolchainConfigOption) configuration.RegistrationServiceConfig
func (*UnitTestSuite) SetSecret ¶
func (s *UnitTestSuite) SetSecret(secret *corev1.Secret)
func (*UnitTestSuite) SetupDefaultApplication ¶
func (s *UnitTestSuite) SetupDefaultApplication()
func (*UnitTestSuite) SetupSuite ¶
func (s *UnitTestSuite) SetupSuite()
SetupSuite sets the suite up and sets testmode.
func (*UnitTestSuite) SetupTest ¶
func (s *UnitTestSuite) SetupTest()
func (*UnitTestSuite) TearDownSuite ¶
func (s *UnitTestSuite) TearDownSuite()
TearDownSuite tears down the test suite.
Click to show internal directories.
Click to hide internal directories.