wip: using pflag and viper; remove go routine for exec file search
This commit is contained in:
23
cmd/wingmate/wingmate_test.go
Normal file
23
cmd/wingmate/wingmate_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEntry_configPathEnv(t *testing.T) {
|
||||
_ = os.Setenv("WINGMATE_CONFIG_PATH", "/Volumes/Source/go/src/gitea.suyono.dev/suyono/wingmate/docker/bookworm/etc/wingmate")
|
||||
defer func() {
|
||||
_ = os.Unsetenv("WINGMATE_CONFIG_PATH")
|
||||
}()
|
||||
main()
|
||||
}
|
||||
|
||||
func TestEntry_configPathPFlag(t *testing.T) {
|
||||
os.Args = []string{"wingmate", "--config", "/Volumes/Source/go/src/gitea.suyono.dev/suyono/wingmate/docker/bookworm/etc/wingmate"}
|
||||
main()
|
||||
}
|
||||
|
||||
func TestEntry(t *testing.T) {
|
||||
main()
|
||||
}
|
||||
Reference in New Issue
Block a user