Fix e2e tests using golden files on windows

This commit is contained in:
guillaume.tardif 2020-06-08 14:43:51 +02:00 committed by Guillaume Tardif
parent 07a29e2d0e
commit c73998bd2d
4 changed files with 15 additions and 2 deletions

View file

@ -28,6 +28,7 @@
package framework
import (
"runtime"
"strings"
"github.com/robpike/filter"
@ -48,6 +49,13 @@ func Columns(line string) []string {
return filter.Choose(strings.Split(line, " "), nonEmptyString).([]string)
}
func GoldenFile(name string) string {
if runtime.GOOS == "windows" {
return name + "-windows.golden"
}
return name + ".golden"
}
// It runs func
func It(description string, test func()) {
test()