~james/core

core/spindle/main_test.go -rw-r--r-- 519 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package spindle

import (
	"os"
	"testing"
)

func TestMain(m *testing.M) {
	for k, v := range map[string]string{
		// the fake plc runs on localhost, and the did resolver only allows that in dev mode
		"IDRESOLVER_DEV":      "1",
		"GIT_CONFIG_GLOBAL":   os.DevNull,
		"GIT_CONFIG_SYSTEM":   os.DevNull,
		"GIT_AUTHOR_NAME":     "spindle",
		"GIT_AUTHOR_EMAIL":    "spindle@tangled.org",
		"GIT_COMMITTER_NAME":  "spindle",
		"GIT_COMMITTER_EMAIL": "spindle@tangled.org",
	} {
		os.Setenv(k, v)
	}
	os.Exit(m.Run())
}