bosun-monitor / bosun

Time Series Alerting Framework
http://bosun.org
MIT License
3.4k stars 495 forks source link

Bug: TestNewManager failed on some build Linux machines #2460

Closed svagner closed 4 years ago

svagner commented 4 years ago

Expected behavior

The unit tests should be able to finish successfully on any machines if code works correctly. We should not expect that hostname for test Linux machine was configured with some particular rules because it can be not true:

Current behavior

=== RUN   TestNewManager
    TestNewManager: manager_test.go:13: Expected hostname to be 'host01.mydomain.com' but it was 'host01'
--- FAIL: TestNewManager (0.00s)

Steps to reproduce

  1. set the hostname for Linux node as host01.mydomain.com
  2. run ./build/validate.sh script

Context

# cat /etc/hostname
host01.mydomain.com
# cat /proc/sys/kernel/hostname
host01.mydomain.com