github.com/BIG5Concepts/forego@v0.16.1/env_test.go (about) 1 package main 2 3 import "testing" 4 5 func TestMultipleEnvironmentFiles(t *testing.T) { 6 envs := []string{"fixtures/envs/.env1", "fixtures/envs/.env2"} 7 env, err := loadEnvs(envs) 8 9 if err != nil { 10 t.Fatalf("Could not read environments: %s", err) 11 } 12 13 if env["env1"] == "" { 14 t.Fatalf("$env1 should be present and is not") 15 } 16 17 if env["env2"] == "" { 18 t.Fatalf("$env2 should be present and is not") 19 } 20 }