1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-29 23:38:14 +02:00
Files
starter/config/config_test.go

29 lines
493 B
Go
Raw Normal View History

2023-03-17 11:20:09 +03:00
package config
import (
2023-07-20 15:54:11 +03:00
"github.com/ManyakRus/starter/micro"
"os"
2023-03-17 11:20:09 +03:00
"testing"
)
func TestLoadEnv(t *testing.T) {
//defer recoveryFunction()
//filename := os.Args[0]
//dir := filepath.Dir(filename)
LoadEnv()
//t.Error("Error TestLoadEnv")
}
2023-07-20 15:54:11 +03:00
func TestLoadEnv_from_file(t *testing.T) {
dir := micro.ProgramDir()
FileName := dir + "test.sh"
LoadEnv_from_file(FileName)
value := os.Getenv("SERVICE_NAME")
if value == "" {
t.Error("TestLoadEnv_from_file() error: value =''")
}
}