func TestRiemannConfShouldDefault(t *testing.T) { assert := assert.New(t) rc := riemann.RiemannConf{} rc.Default() assert.Equal("localhost", rc.Host) assert.Equal(uint(5555), rc.Port) }
func TestRiemannConfShouldValidate(t *testing.T) { assert := assert.New(t) rc := riemann.RiemannConf{ Host: "example.com", Port: 42, } err := rc.Validate() assert.Nil(err) assert.Equal("example.com", rc.Host) assert.Equal(uint(42), rc.Port) }