Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestEnv ¶
type TestEnv struct {
Server *httptest.Server
Mux *http.ServeMux
Client *hcloud.Client
RobotClient hrobot.RobotClient
ServerCache *cache.Cache[hcloud.Server]
Recorder *events.Recorder
Cfg config.HCCMConfiguration
}
TestEnv provides a test server that mocks the Hetzner Cloud and Hetzner Robot APIs, together with clients that are configured to talk to it.
func New ¶
func New() TestEnv
New returns a ready to use TestEnv. The caller is responsible for calling TestEnv.Teardown.