center

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Copyright © 2023 Joost Evertse joustie@gmail.com

Index

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

func SetupTestEnv(t *testing.T, host string)

SetupTestEnv sets up test environment variables

func TeardownTestEnv

func TeardownTestEnv(t *testing.T)

TeardownTestEnv cleans up test environment variables

func TestCenter

func TestCenter(id int64, name, centerType, typeLabel string) leostream.Center

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL