testutil

package
v0.0.0-...-dfd24c6 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIDownloadLockFileCleanUp

func CLIDownloadLockFileCleanUp(t *testing.T)

func CreateDummyProgressListener

func CreateDummyProgressListener(t *testing.T)

func CreateFileOrFail

func CreateFileOrFail(t *testing.T, filePath string, content []byte)

CreateFileOrFail creates a file in filePath with the specified content, and fails the test if there's error. If the path to the file doesn't exist, CreateFileOrFail will create it. The file does not get cleaned up, and it is the caller's responsibility to remove it.

func CreateTempFile

func CreateTempFile(tempDir string, t *testing.T) *os.File

func GetEnvironmentToken

func GetEnvironmentToken() string

func IntegTest

func IntegTest(t *testing.T) *config.Config

func NotOnWindows

func NotOnWindows(t *testing.T, reason string)

func OnlyEnableCode

func OnlyEnableCode()

func OnlyOnWindows

func OnlyOnWindows(t *testing.T, reason string)

func SmokeTest

func SmokeTest(t *testing.T) *config.Config

func UnitTest

func UnitTest(t *testing.T) *config.Config

Types

type JsonRPCRecorder

type JsonRPCRecorder struct {
	// contains filtered or unexported fields
}

func (*JsonRPCRecorder) Callbacks

func (r *JsonRPCRecorder) Callbacks() []jrpc2.Request

func (*JsonRPCRecorder) ClearCallbacks

func (r *JsonRPCRecorder) ClearCallbacks()

func (*JsonRPCRecorder) ClearNotifications

func (r *JsonRPCRecorder) ClearNotifications()

func (*JsonRPCRecorder) FindCallbacksByMethod

func (r *JsonRPCRecorder) FindCallbacksByMethod(method string) []jrpc2.Request

func (*JsonRPCRecorder) FindNotificationsByMethod

func (r *JsonRPCRecorder) FindNotificationsByMethod(method string) []jrpc2.Request

func (*JsonRPCRecorder) Notifications

func (r *JsonRPCRecorder) Notifications() []jrpc2.Request

func (*JsonRPCRecorder) Record

func (r *JsonRPCRecorder) Record(request jrpc2.Request)

Jump to

Keyboard shortcuts

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