ci: convert string for windows

上级 988a43f4
......@@ -7,10 +7,9 @@ package cmd
import (
"bytes"
"flag"
"github.com/pkg/errors"
"io/ioutil"
"path/filepath"
"github.com/pkg/errors"
)
// UpdateGolden writes out the golden files with the latest values, rather than failing the test.
......@@ -73,9 +72,12 @@ func compare(actual []byte, filename string) error {
if err != nil {
return errors.Wrapf(err, "unable to read testdata %s", filename)
}
if !bytes.Equal(expected, actual) {
if string(expected) != string(actual) {
return errors.Errorf("does not match golden file %s\n\nWANT:\n'%s'\n\nGOT:\n'%s'\n", filename, expected, actual)
}
//if !bytes.Equal(expected, actual) {
// return errors.Errorf("does not match golden file %s\n\nWANT:\n'%s'\n\nGOT:\n'%s'\n", filename, expected, actual)
//}
return nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册