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

Function TestNewUploadManagerFactory

ots3/dependency_test.go:17–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15func (p Populator) Populate(target interface{}) error { return nil }
16
17func TestNewUploadManagerFactory(t *testing.T) {
18 s3out := provideFactory(&providersOption{})(factoryIn{
19 Conf: config.MapAdapter{"s3": map[string]S3Config{
20 "default": {},
21 "alternative": {},
22 }},
23 Populator: Populator{},
24 })
25 def, err := s3out.Factory.Make("default")
26 assert.NoError(t, err)
27 assert.NotNil(t, def)
28 alt, err := s3out.Factory.Make("alternative")
29 assert.NoError(t, err)
30 assert.NotNil(t, alt)
31}
32
33func TestNewUploadManagerFactory_customOption(t *testing.T) {
34 dispatcher := &events.SyncDispatcher{}

Callers

nothing calls this directly

Calls 2

provideFactoryFunction · 0.70
MakeMethod · 0.65

Tested by

no test coverage detected