MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestFailedDriverConstructor

Function TestFailedDriverConstructor

leader/dependency_test.go:64–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestFailedDriverConstructor(t *testing.T) {
65 ctor := func(args DriverArgs) (Driver, error) {
66 return nil, fmt.Errorf("failed")
67 }
68 _, err := provide(&providersOption{
69 driver: nil,
70 driverConstructor: ctor,
71 })(in{})
72 assert.Error(t, err)
73}
74
75type mockPopulator struct {
76 endpoints []string

Callers

nothing calls this directly

Calls 2

provideFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected