testutils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testutils provides helpers for testing github-copilot-svcs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupEnv

func CleanupEnv()

CleanupEnv cleans up test environment variables

func CreateTestServer

func CreateTestServer(cfg *internal.Config) *internal.Server

CreateTestServer creates a test server with the given config

func InitLogger

func InitLogger()

InitLogger initializes the logger for tests

func LoadFixture

func LoadFixture(t *testing.T, path string) []byte

LoadFixture loads a test fixture file

func MockConfig

func MockConfig() *internal.Config

MockConfig returns a test configuration for use in unit tests.

func MockGitHubServer

func MockGitHubServer() *httptest.Server

MockGitHubServer creates a mock GitHub API server

func SetupInvalidToken

func SetupInvalidToken()

SetupInvalidToken sets up environment for invalid token tests

func SetupTestDir

func SetupTestDir(t *testing.T) string

SetupTestDir creates a temporary directory for tests

func SetupValidToken

func SetupValidToken()

SetupValidToken sets up environment for valid token tests

Types

This section is empty.

Jump to

Keyboard shortcuts

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