MCPcopy
hub / github.com/minio/minio-go / TestCredentialsGetWithError

Function TestCredentialsGetWithError

pkg/credentials/credentials_test.go:70–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestCredentialsGetWithError(t *testing.T) {
71 c := New(&credProvider{err: errors.New("Custom error")})
72
73 _, err := c.GetWithContext(defaultCredContext)
74 if err != nil {
75 if err.Error() != "Custom error" {
76 t.Errorf("Expected \"Custom error\", got %s", err.Error())
77 }
78 }
79}

Callers

nothing calls this directly

Calls 3

GetWithContextMethod · 0.80
NewFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected