test

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExecName = "otelbuild"
)

Variables

View Source
var TestCases = make([]*TestCase, 0)

Functions

func ExecLatestTest

func ExecLatestTest(t *testing.T, dependencyName, moduleName string, minVersion, maxVersion *version.Version, testFunc func(*testing.T, ...string))

func ExecMuzzle

func ExecMuzzle(t *testing.T, dependencyName, moduleName string, minVersion, maxVersion *version.Version, muzzleClasses []string)

func ExpectContains

func ExpectContains(t *testing.T, text, expect string)

func ExpectContainsAllItem

func ExpectContainsAllItem(t *testing.T, actualItems []string, expectedItems ...string)

func ExpectContainsNothing

func ExpectContainsNothing(t *testing.T, actualItems []string)

func ExpectInstrumentContains

func ExpectInstrumentContains(t *testing.T, log string, rule string)

func ExpectInstrumentNotContains

func ExpectInstrumentNotContains(t *testing.T, log string, rule string)

func ExpectNotContains

func ExpectNotContains(t *testing.T, text, expect string)

func ExpectPreprocessContains

func ExpectPreprocessContains(t *testing.T, log string, rule string)

func ExpectPreprocessNotContains

func ExpectPreprocessNotContains(t *testing.T, log string, rule string)

func ExpectSame

func ExpectSame(t *testing.T, expected, actual string)

func ExpectStderrContains

func ExpectStderrContains(t *testing.T, expect string)

func ExpectStdoutContains

func ExpectStdoutContains(t *testing.T, expect string)

func ExpectWhen

func ExpectWhen(t *testing.T, prediction func() (res bool, msg string))

func FetchVersion

func FetchVersion(t *testing.T, dependency, version string) string

func ReadInstrumentLog

func ReadInstrumentLog(t *testing.T, fileName string) string

func ReadPreprocessLog

func ReadPreprocessLog(t *testing.T, fileName string) string

func RunApp

func RunApp(t *testing.T, appName string, env ...string) (string, string)

func RunCmd

func RunCmd(args []string) *exec.Cmd

func RunGoBuild

func RunGoBuild(t *testing.T, args ...string)

func RunInstrument

func RunInstrument(t *testing.T, args ...string)

func RunInstrumentFallible

func RunInstrumentFallible(t *testing.T, args ...string)

func TBuildAppNoop

func TBuildAppNoop(t *testing.T, appName string, muzzleClasses ...string)

func TestBasicFastHttp

func TestBasicFastHttp(t *testing.T, env ...string)

func TestBasicFastHttps

func TestBasicFastHttps(t *testing.T, env ...string)

func TestBasicGrpc

func TestBasicGrpc(t *testing.T, env ...string)

func TestBasicHertz

func TestBasicHertz(t *testing.T, env ...string)

func TestBasicHertzWithException

func TestBasicHertzWithException(t *testing.T, env ...string)

func TestBasicHertzWithHook

func TestBasicHertzWithHook(t *testing.T, env ...string)

func TestBasicHertzWithRegex

func TestBasicHertzWithRegex(t *testing.T, env ...string)

func TestBasicMux

func TestBasicMux(t *testing.T, env ...string)

func TestBasicNetHttp

func TestBasicNetHttp(t *testing.T, env ...string)

func TestBatch

func TestBatch(t *testing.T, env ...string)

func TestCrudMongo

func TestCrudMongo(t *testing.T, env ...string)

func TestCursor

func TestCursor(t *testing.T, env ...string)

func TestExecutingCommands

func TestExecutingCommands(t *testing.T, env ...string)

func TestExecutingUnsupporetedCommands

func TestExecutingUnsupporetedCommands(t *testing.T, env ...string)

func TestGinHTML

func TestGinHTML(t *testing.T, env ...string)

func TestGinPattern

func TestGinPattern(t *testing.T, env ...string)

func TestGoLog

func TestGoLog(t *testing.T, env ...string)

func TestGormCrud1220

func TestGormCrud1220(t *testing.T, env ...string)

func TestGormCrud1231

func TestGormCrud1231(t *testing.T, env ...string)

func TestGrpcStatus

func TestGrpcStatus(t *testing.T, env ...string)

func TestGrpcStream

func TestGrpcStream(t *testing.T, env ...string)

func TestHttp2

func TestHttp2(t *testing.T, env ...string)

func TestHttpMetric

func TestHttpMetric(t *testing.T, env ...string)

func TestHttps

func TestHttps(t *testing.T, env ...string)

func TestKratosGrpc

func TestKratosGrpc(t *testing.T, env ...string)

func TestKratosHttp

func TestKratosHttp(t *testing.T, env ...string)

func TestLogrus

func TestLogrus(t *testing.T, env ...string)

func TestMuxMiddleware

func TestMuxMiddleware(t *testing.T, env ...string)

func TestMuxPattern

func TestMuxPattern(t *testing.T, env ...string)

func TestMuxPrefix

func TestMuxPrefix(t *testing.T, env ...string)

func TestRedigoDoCommands

func TestRedigoDoCommands(t *testing.T, env ...string)

func TestRedigoExecutingCommands

func TestRedigoExecutingCommands(t *testing.T, env ...string)

func TestRedigoTransactions

func TestRedigoTransactions(t *testing.T, env ...string)

func TestRedigoUnsupportedCommands

func TestRedigoUnsupportedCommands(t *testing.T, env ...string)

func TestRedisConn

func TestRedisConn(t *testing.T, env ...string)

func TestRedisRing

func TestRedisRing(t *testing.T, env ...string)

func TestRedisTransactions

func TestRedisTransactions(t *testing.T, env ...string)

func TestRedisUniversal

func TestRedisUniversal(t *testing.T, env ...string)

func TestV8ExecutingCommands

func TestV8ExecutingCommands(t *testing.T, env ...string)

func TestV8ExecutingUnsupporetedCommands

func TestV8ExecutingUnsupporetedCommands(t *testing.T, env ...string)

func TestV8RedisConn

func TestV8RedisConn(t *testing.T, env ...string)

func TestV8RedisRing

func TestV8RedisRing(t *testing.T, env ...string)

func TestV8RedisTransactions

func TestV8RedisTransactions(t *testing.T, env ...string)

func TestV8RedisUniversal

func TestV8RedisUniversal(t *testing.T, env ...string)

func TestZap

func TestZap(t *testing.T, env ...string)

func UseApp

func UseApp(appName string)

func UseTestRules

func UseTestRules(name string) string

Types

type TestCase

type TestCase struct {
	TestName           string
	DependencyName     string
	ModuleName         string
	MinVersion         *version.Version
	MaxVersion         *version.Version
	MinGoVersion       *version.Version
	MaxGoVersion       *version.Version
	TestFunc           func(t *testing.T, env ...string)
	LatestDepthFunc    func(t *testing.T, env ...string)
	MuzzleClasses      []string
	IsMuzzleCheck      bool
	IsLatestDepthCheck bool
}

func NewGeneralTestCase

func NewGeneralTestCase(testName, moduleName, minVersion, maxVersion, minGoVersion, maxGoVersion string, testFunc func(t *testing.T, env ...string)) *TestCase

func NewLatestDepthTestCase

func NewLatestDepthTestCase(testName, dependencyName, moduleName, minVersion, maxVersion, minGoVersion, maxGoVersion string, latestTestFunc func(t *testing.T, env ...string)) *TestCase

func NewMuzzleTestCase

func NewMuzzleTestCase(testName, dependencyName, moduleName, minVersion, maxVersion, minGoVersion, maxGoVersion string, muzzleClasses []string) *TestCase

Directories

Path Synopsis
verifier module

Jump to

Keyboard shortcuts

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