Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

testutil

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:19Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const (WaitShort     = 10 *time.SecondWaitMedium    = 15 *time.SecondWaitLong      = 25 *time.SecondWaitSuperLong = 60 *time.Second)

Constants for timing out operations, usable for creating contextsthat timeout or in require.Eventually.

View Source
const (IntervalFast   = 25 *time.MillisecondIntervalMedium = 250 *time.MillisecondIntervalSlow   =time.Second)

Constants for delaying repeated operations, e.g. inrequire.Eventually.

Variables

This section is empty.

Functions

funcContextadded inv0.9.9

func Context(t *testing.T, durtime.Duration)context.Context

funcCreateTempadded inv0.15.0

func CreateTemp(t *testing.T, dir, patternstring) *os.File

CreateTemp is a convenience function for creating a temporary file, likeos.CreateTemp, but it also registers a cleanup function to close and removethe file.

funcEventuallyadded inv0.8.3

func Eventually(ctxcontext.Context, ttesting.TB, condition func(ctxcontext.Context) (donebool), ticktime.Duration, msgAndArgs ...interface{}) (donebool)

Eventually is like require.Eventually except it allows passinga context into the condition. It is safe to use with `require.*`.

If ctx times out, the test will fail, but not immediately.It is the caller's responsibility to exit early if required.

It is the caller's responsibility to ensure that ctx has adeadline or timeout set. Eventually will panic if this is notthe case in order to avoid potentially waiting forever.

condition is not run in a goroutine; use the providedcontext argument for cancellation if required.

funcGenerateTLSCertificateadded inv0.10.0

func GenerateTLSCertificate(ttesting.TB, commonNamestring)tls.Certificate

funcInCIadded inv0.22.1

func InCI()bool

funcRaceEnabledadded inv0.26.0

func RaceEnabled()bool

RaceEnabled returns whether the race detector is enabled.This is a constant at compile time. It should be used toconditionally skip tests that are known to be sensitive tobeing run with the race detector enabled.Please use sparingly and as a last resort.

funcSkipIfNotTimingadded inv0.23.1

func SkipIfNotTiming(t *testing.T)

funcTempFileadded inv0.15.0

func TempFile(t *testing.T, dir, patternstring)string

TempFile returns the name of a temporary file that does not exist.

Types

typeOAuth2Configadded inv0.20.1

type OAuth2Config struct {Token           *oauth2.TokenTokenSourceFuncOAuth2TokenSource}

func (*OAuth2Config)AuthCodeURLadded inv0.20.1

func (*OAuth2Config) AuthCodeURL(statestring, _ ...oauth2.AuthCodeOption)string

func (*OAuth2Config)Exchangeadded inv0.20.1

func (*OAuth2Config)TokenSourceadded inv0.20.1

typeOAuth2TokenSourceadded inv0.20.1

type OAuth2TokenSource func() (*oauth2.Token,error)

func (OAuth2TokenSource)Tokenadded inv0.20.1

func (oOAuth2TokenSource) Token() (*oauth2.Token,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp