update repo
This commit is contained in:
29
traefik/traefik-certs-dumper/hook/hook_test.go
Normal file
29
traefik/traefik-certs-dumper/hook/hook_test.go
Normal file
@@ -0,0 +1,29 @@
|
||||
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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user