Documentation
¶
Overview ¶
Copyright © 2023 Joost Evertse joustie@gmail.com
Index ¶
- func NewMockServer(t *testing.T, config MockServerConfig) *httptest.Server
- func SetupTestEnv(t *testing.T, host string)
- func TeardownTestEnv(t *testing.T)
- func TestCenter(id int64, name, centerType, typeLabel string) leostream.Center
- func TestCenterStored(center leostream.Center) leostream.CenterStored
- func TestCenterSummary(id, online, status int64, name, centerType, typeLabel string) leostream.CenterSummary
- type MockServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockServer ¶
func NewMockServer(t *testing.T, config MockServerConfig) *httptest.Server
NewMockServer creates a new HTTPS mock server with the given config
func SetupTestEnv ¶
SetupTestEnv sets up test environment variables
func TeardownTestEnv ¶
TeardownTestEnv cleans up test environment variables
func TestCenter ¶
TestCenter is a helper to create a center with images
func TestCenterStored ¶
func TestCenterStored(center leostream.Center) leostream.CenterStored
TestCenterStored is a helper to create a stored center response
func TestCenterSummary ¶
func TestCenterSummary(id, online, status int64, name, centerType, typeLabel string) leostream.CenterSummary
TestCenterSummary is a helper to create a center summary
Types ¶
type MockServerConfig ¶
type MockServerConfig struct {
LoginResponse leostream.AuthResponse
Paths map[string]http.HandlerFunc
}
MockServerConfig holds configuration for mock server responses
Click to show internal directories.
Click to hide internal directories.