inCaller / prometheus_bot

Telegram bot for prometheus alerting
MIT License
395 stars 182 forks source link

Scale Measure Unit function #19

Closed AndreaGreco closed 7 years ago

AndreaGreco commented 7 years ago

Add Scale measure unit function, it group all other function.

hryamzik commented 7 years ago

Hi @AndreaGreco, looks like incaller's CI has some issues so I ran tests manually and some of them failed:

$ prove -v
t/curl.t .. 
1..16
ok 1 - emptyValue.json template none
ok 2 - noGenURL.json template none
ok 3 - production_example.json template none
ok 4 - simpe.json template none
ok 5 - emptyValue.json template default.tmpl
ok 6 - noGenURL.json template default.tmpl
ok 7 - production_example.json template default.tmpl
ok 8 - simpe.json template default.tmpl
ok 9 - emptyValue.json template detailed_vars.tmpl
ok 10 - noGenURL.json template detailed_vars.tmpl
ok 11 - production_example.json template detailed_vars.tmpl
ok 12 - simpe.json template detailed_vars.tmpl
not ok 13 - emptyValue.json template production_example.tmpl
not ok 14 - noGenURL.json template production_example.tmpl
not ok 15 - production_example.json template production_example.tmpl
not ok 16 - simpe.json template production_example.tmpl
Failed 4/16 subtests 

I don't have time to dig through this but tests have to be green for a merge.

AndreaGreco commented 7 years ago

Required for test:

telegram_token: ""
template_path: ""
time_zone: "Europe/Rome"
time_outdata: "02/01/2006 15:04:05"
split_token: "|" <-------- THIS
hryamzik commented 7 years ago

So you want to test this with different configs, that looks complicated. Can you make a default value for this setting? I'm going to keep test config unchanged to ensure new code is compatible with original configuration.

AndreaGreco commented 7 years ago

Done

hryamzik commented 7 years ago

Thanks!