Documentation
¶
Index ¶
- Variables
- func GlobResultToChildTestName(filePath string, basePath string) string
- func GlobTestResources(fileGlob string, ignoredSuffixes []string) []string
- func InitTestIO()
- func MustParseTimeRFC3339(timeStr string) time.Time
- func MustPlaceTemporalFile(filePath, content string) (cleanup func())
- func MustReadText(filePath string) string
- func MustReadYaml(filePath string) map[string]any
- func P[T any](value T) *T
- func RemoveSlogTimestampFromLine(log string) string
- func ResponseFromString(code int, response string) *http.Response
- func VerifyWithGolden(t testing.TB, verificationTargetName string, body string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ForceUpdateGolden = false
Functions ¶
func GlobResultToChildTestName ¶
* * KHI has many tests using configurations and these configurations are read by glob. * glob result can contain non meaningful relative path and slash.
func GlobTestResources ¶
func InitTestIO ¶
func InitTestIO()
func MustParseTimeRFC3339 ¶
func MustPlaceTemporalFile ¶
func MustPlaceTemporalFile(filePath, content string) (cleanup func())
MustPlaceTemporalFile write a file at the specified path and returns a function to unlink it for cleaning up.
func MustReadText ¶
func MustReadYaml ¶
func P ¶
func P[T any](value T) *T
P returns the pointer of given value. This is helper to get the pointer from literal because Go doesn't allow &"foo".
func RemoveSlogTimestampFromLine ¶
Removes timestamps from slog logs
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.