oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package equipo
2
3import "testing"
4
5// EQUIPO_MAC_ENGINEERING=1 turns on Mac Engineering; anything else
6// leaves it off, so a release deploys inert.
7func TestMacEngineeringSwitch(t *testing.T) {
8 for _, value := range []string{"", "0", "true", "yes", "1"} {
9 env := map[string]string{"EQUIPO_ORIGIN": "https://equipo.bds.oncarlos.com", "EQUIPO_INSTANCE_KEY": "fixture", "CARLOS_MAIL": "submit", "EQUIPO_MAC_ENGINEERING": value}
10 cfg, err := LoadConfig(func(k string) string { return env[k] })
11 if err != nil {
12 t.Fatal(err)
13 }
14 if cfg.MacEngineering != (value == "1") {
15 t.Fatal(value, cfg.MacEngineering)
16 }
17 }
18}
19