Documentation
¶
Index ¶
- func CaptureOutput(t *testing.T, f func()) (stdout, stderr string)
- func CreateTestToken(t *testing.T, expired bool) *oauth2.Token
- func MockDeviceFlowServer(t *testing.T) *httptest.Server
- func MockGitHubAPI(t *testing.T, handlers map[string]http.HandlerFunc) *httptest.Server
- func ReadTestFile(t *testing.T, filename string) []byte
- func SetEnvVars(t *testing.T, vars map[string]string) func()
- func SetupTestConfig(t *testing.T) (string, func())
- func TempDir(t *testing.T) (string, func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureOutput ¶
CaptureOutput captures stdout and stderr during a test
func CreateTestToken ¶
CreateTestToken creates a test OAuth2 token
func MockDeviceFlowServer ¶
MockDeviceFlowServer creates a mock server for GitHub's device flow
func MockGitHubAPI ¶
MockGitHubAPI creates a mock GitHub API server
func ReadTestFile ¶
ReadTestFile reads a test file from the testdata directory
func SetEnvVars ¶
SetEnvVars sets environment variables for testing and returns a cleanup function
func SetupTestConfig ¶
SetupTestConfig creates a test configuration in a temporary directory
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.