Example #1
0
func TestStartMonitoring(t *testing.T) {
	config := funcmon.Config{
		Host: "127.0.0.1",
		Port: 8086,
		DB:   "funcmon",
	}
	client, err := funcmon.NewClient(config)
	client.StartMonitoring("test")
	assert.Nil(t, err, "Error is not nil")
}
Example #2
0
func TestNewClient(t *testing.T) {
	config := funcmon.Config{
		Host: "127.0.0.1",
		Port: 8086,
		DB:   "funcmon",
	}
	client, err := funcmon.NewClient(config)
	assert.Nil(t, err, "Error is not nil")
	assert.NotNil(t, client, "Client is not initialized")

}