MCPcopy Index your code
hub / github.com/bytebase/bytebase / getTestProfileWithExternalPg

Function getTestProfileWithExternalPg

backend/tests/tests.go:249–256  ·  view source on GitHub ↗

GetTestProfileWithExternalPg will return a profile for testing with external Postgres. We require port as an argument of GetTestProfile so that test can run in parallel in different ports, pgURL for connect to Postgres.

(port int, pgURL string)

Source from the content-addressed store, hash-verified

247// We require port as an argument of GetTestProfile so that test can run in parallel in different ports,
248// pgURL for connect to Postgres.
249func getTestProfileWithExternalPg(port int, pgURL string) *component.Profile {
250 return &component.Profile{
251 Mode: common.ReleaseModeDev,
252 ExternalURL: fmt.Sprintf("http://localhost:%d", port),
253 Port: port,
254 PgURL: pgURL,
255 }
256}
257
258// start only called by StartServer() and StartServerWithExternalPg().
259func (ctl *controller) start(ctx context.Context, port int) (context.Context, error) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected