From cde47cac87022d44465e793f07fbd82a5587939d Mon Sep 17 00:00:00 2001 From: Karl Matthias Date: Tue, 14 Feb 2017 06:00:44 -0800 Subject: [PATCH] Just validate size. Fixes issues on Linux --- haproxy/haproxy_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/haproxy/haproxy_test.go b/haproxy/haproxy_test.go index adc0494d..f2b4e8a2 100644 --- a/haproxy/haproxy_test.go +++ b/haproxy/haproxy_test.go @@ -214,7 +214,6 @@ func Test_HAproxy(t *testing.T) { }) Convey("Watch() writes out a config when the state changes", func() { - startTime := time.Now().Truncate(time.Second) // Localized to compare with os.Stat tmpDir, _ := ioutil.TempDir("/tmp", "sidecar-test") config := fmt.Sprintf("%s/haproxy.cfg", tmpDir) proxy.ConfigFile = config @@ -239,8 +238,7 @@ func Test_HAproxy(t *testing.T) { for { stat, _ := os.Stat(config) if stat != nil { - if startTime.Before(stat.ModTime()) || startTime.Equal(stat.ModTime()) && - stat.Size() > 10000 { + if stat.Size() > 10000 { break } }