MCPcopy Create free account
hub / github.com/ericls/imgdd / NewTestExternalServiceManager

Function NewTestExternalServiceManager

test_support/services.go:56–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54}
55
56func NewTestExternalServiceManager() *TestExternalServiceManager {
57 pool, err := dockertest.NewPool("")
58 pool.MaxWait = 10 * time.Second
59 if err != nil {
60 panic(err)
61 }
62 err = pool.Client.Ping()
63 if err != nil {
64 panic(err)
65 }
66 s3Config := &TestS3Config{
67 Bucket: "test-bucket",
68 Access: "minio",
69 Secret: "minio123",
70 Port: "",
71 }
72 dbConfig := &db.DBConfigDef{
73 POSTGRES_DB: "imgdd_test",
74 POSTGRES_PASSWORD: "imgdd_test",
75 POSTGRES_USER: "imgdd_test",
76 POSTGRES_HOST: "localhost",
77 POSTGRES_PORT: "",
78 }
79 webDavConfig := &TestWebDAVConfig{
80 Username: "test",
81 Password: "test",
82 Port: "",
83 }
84 ipfsMfsConfig := &TestIPFSMFSConfig{
85 ApiPort: "",
86 }
87 return &TestExternalServiceManager{
88 Pool: pool,
89 dbResource: nil,
90 redisResource: nil,
91 minioResource: nil,
92 s3Config: s3Config,
93 dbConfig: dbConfig,
94 webDavConfig: webDavConfig,
95 ipfsMfsConfig: ipfsMfsConfig,
96 logger: logging.GetLogger("TESM"),
97 }
98}
99
100func (ts *TestExternalServiceManager) StartPostgres() {
101 ts.lock.Lock()

Callers 4

storage_test.goFile · 0.92
identity_test.goFile · 0.92
graph_test.goFile · 0.92
httpserver_test.goFile · 0.92

Calls 1

GetLoggerFunction · 0.92

Tested by

no test coverage detected