testutil

package
v0.0.0-...-4dc51e6 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 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(t *testing.T, tempDir string) *os.File

func GetEnvironmentToken

func GetEnvironmentToken(useConsistentIgnores bool) 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, useConsistentIgnores bool) *config.Config

TODO: remove useConsistentIgnores once we have fully rolled out the feature

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