MCPcopy
hub / github.com/iron-io/functions / setupServer

Function setupServer

api/server/integration_test.go:28–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26var fn *cli.App
27
28func setupServer() {
29 viper.Set(EnvDBURL, fmt.Sprintf("bolt://%s?bucket=funcs", DB_FILE))
30 viper.Set(EnvMQURL, fmt.Sprintf("bolt://%s", MQ_FILE))
31 viper.Set(EnvPort, PORT)
32 Ctx, Cancel = context.WithCancel(context.Background())
33 funcServer = NewFromEnv(Ctx)
34 go funcServer.Start(Ctx)
35 time.Sleep(2 * time.Second)
36}
37
38func setupCli() {
39 viper.Set("API_URL", API_URL)

Callers 2

TestIntegrationFunction · 0.85
TestIntegrationWithAuthFunction · 0.85

Calls 3

NewFromEnvFunction · 0.85
SetMethod · 0.65
StartMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…