dont display t.Log/t.Logf as errors in github actions (#1508)

* fix tests and github action annotations

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-04-09 14:05:46 +03:00
committed by GitHub
parent bc1c8223e6
commit 1063b954de
15 changed files with 118 additions and 41 deletions

View File

@@ -226,8 +226,8 @@ func (s *service) start() error {
ch <- l.Close()
}()
if logger.V(logger.InfoLevel, log) {
log.Infof("Listening on %v", l.Addr().String())
if logger.V(logger.DebugLevel, log) {
log.Debugf("Listening on %v", l.Addr().String())
}
return nil
}

View File

@@ -110,7 +110,9 @@ func TestService(t *testing.T) {
t.Fatalf("service.Run():%v", err)
}
case <-time.After(time.Duration(time.Second)):
t.Logf("service.Run() survived a client request without an error")
if len(os.Getenv("IN_TRAVIS_CI")) == 0 {
t.Logf("service.Run() survived a client request without an error")
}
}
ch := make(chan os.Signal, 1)
@@ -125,10 +127,14 @@ func TestService(t *testing.T) {
if err != nil {
t.Fatalf("service.Run():%v", err)
} else {
t.Log("service.Run() nil return on syscall.SIGTERM")
if len(os.Getenv("IN_TRAVIS_CI")) == 0 {
t.Log("service.Run() nil return on syscall.SIGTERM")
}
}
case <-time.After(time.Duration(time.Second)):
t.Logf("service.Run() survived a client request without an error")
if len(os.Getenv("IN_TRAVIS_CI")) == 0 {
t.Logf("service.Run() survived a client request without an error")
}
}
eventually(func() bool {
@@ -286,7 +292,9 @@ func TestTLS(t *testing.T) {
t.Fatalf("service.Run():%v", err)
}
case <-time.After(time.Duration(time.Second)):
t.Logf("service.Run() survived a client request without an error")
if len(os.Getenv("IN_TRAVIS_CI")) == 0 {
t.Logf("service.Run() survived a client request without an error")
}
}
}