traefik-certs-dumper/hook/hook_test.go
2019-09-30 14:51:30 +02:00

29 lines
431 B
Go

package hook
import "testing"
func Test_execute(t *testing.T) {
testCases := []struct {
desc string
command string
}{
{
desc: "expand env vars",
command: `echo "${GOPATH} ${GOARCH}"`,
},
{
desc: "simple",
command: `echo 'hello'`,
},
}
for _, test := range testCases {
t.Run(test.desc, func(t *testing.T) {
err := execute(test.command)
if err != nil {
t.Fatal(err)
}
})
}
}