Documentation
¶
Index ¶
- type E2ETestSuite
- func (s *E2ETestSuite) BeforeEachTest()
- func (s *E2ETestSuite) CreateTestUser() *domain.User
- func (s *E2ETestSuite) LoginUser(testUser *domain.User) string
- func (s *E2ETestSuite) MakeRequest(method, path, body, token string) *http.Response
- func (s *E2ETestSuite) SetupSuite()
- func (s *E2ETestSuite) TearDownSuite()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type E2ETestSuite ¶
E2ETestSuite provides a test suite with a real Postgres database using Testcontainers
func (*E2ETestSuite) BeforeEachTest ¶
func (s *E2ETestSuite) BeforeEachTest()
BeforeEachTest runs before each test in the E2ETestSuite. It enables parallel test execution.
func (*E2ETestSuite) CreateTestUser ¶
func (s *E2ETestSuite) CreateTestUser() *domain.User
CreateTestUser creates a unique test user via the POST /user/ endpoint
func (*E2ETestSuite) LoginUser ¶
func (s *E2ETestSuite) LoginUser(testUser *domain.User) string
LoginUser makes an actual HTTP request to login and returns the JWT token
func (*E2ETestSuite) MakeRequest ¶
func (s *E2ETestSuite) MakeRequest( method, path, body, token string, ) *http.Response
MakeRequest is a helper for making HTTP requests in tests
func (*E2ETestSuite) SetupSuite ¶
func (s *E2ETestSuite) SetupSuite()
SetupSuite initializes the test suite with a real Postgres database
func (*E2ETestSuite) TearDownSuite ¶
func (s *E2ETestSuite) TearDownSuite()
TearDownSuite cleans up the test suite resources
Click to show internal directories.
Click to hide internal directories.