MCPcopy
hub / github.com/restic/restic / OK

Function OK

internal/test/helpers.go:27–32  ·  view source on GitHub ↗

OK fails the test if an err is not nil.

(tb testing.TB, err error)

Source from the content-addressed store, hash-verified

25
26// OK fails the test if an err is not nil.
27func OK(tb testing.TB, err error) {
28 tb.Helper()
29 if err != nil {
30 tb.Fatalf("\033[31munexpected error: %+v\033[39m\n\n", err)
31 }
32}
33
34// OKs fails the test if any error from errs is not nil.
35func OKs(tb testing.TB, errs []error) {

Callers 15

TestForgetFunction · 0.92
TestParseFunction · 0.92
concurrencyTesterFunction · 0.92
TestFreezeFunction · 0.92
TestLoadMethod · 0.92
TestSaveMethod · 0.92
storeFunction · 0.92
TestBackendMethod · 0.92
TestReadLimiterFunction · 0.92
TestWriteLimiterFunction · 0.92
TestRoundTripperReaderFunction · 0.92

Calls 1

FatalfMethod · 0.80

Tested by 15

TestForgetFunction · 0.74
TestParseFunction · 0.74
concurrencyTesterFunction · 0.74
TestFreezeFunction · 0.74
TestReadLimiterFunction · 0.74
TestWriteLimiterFunction · 0.74
TestRoundTripperReaderFunction · 0.74
TestBackendListRetryFunction · 0.74
TestBackendLoadRetryFunction · 0.74
TestMissingPackFunction · 0.74
TestUnreferencedPackFunction · 0.74