MCPcopy Index your code
hub / github.com/TheThingsNetwork/lorawan-stack / StartDevStack

Method StartDevStack

tools/mage/dev.go:341–368  ·  view source on GitHub ↗

StartDevStack starts TTS in end-to-end test configuration.

()

Source from the content-addressed store, hash-verified

339
340// StartDevStack starts TTS in end-to-end test configuration.
341func (Dev) StartDevStack() error {
342 os.Setenv("TTN_LW_IS_DATABASE_URI", databaseURI)
343 os.Setenv("TTN_LW_IS_ADMIN_RIGHTS_ALL", "true")
344 if mg.Verbose() {
345 fmt.Println("Starting the Stack")
346 }
347 if err := os.MkdirAll(".cache", 0o755); err != nil {
348 return err
349 }
350 logFile, err := os.OpenFile(filepath.Join(".cache", "devStack.log"), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)
351 if err != nil {
352 return err
353 }
354 defer logFile.Close()
355 if os.Getenv("CI") == "true" {
356 return execFrom(
357 "",
358 map[string]string{},
359 logFile,
360 logFile,
361 "./ttn-lw-stack",
362 "start",
363 "--log.format=json",
364 "--config=config/stack/ttn-lw-stack-tls.yml",
365 )
366 }
367 return execGo(logFile, logFile, "run", "./cmd/ttn-lw-stack", "start", "--log.format=json")
368}
369
370func (Dev) ServeDevWebui() error {
371 if mg.Verbose() {

Callers

nothing calls this directly

Calls 4

execFromFunction · 0.85
execGoFunction · 0.85
JoinMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected