END_TEST START_TEST(test_sane_flush_interval) { fail_unless(sane_flush_interval(-1) == 1); fail_unless(sane_flush_interval(0) == 1); fail_unless(sane_flush_interval(60) == 0); fail_unless(sane_flush_interval(120) == 0); fail_unless(sane_flush_interval(86400) == 0); }
/** * Validates the configuration * @arg config The config object to validate. * @return 0 on success. */ int validate_config(statsite_config *config) { int res = 0; res |= sane_log_level(config->log_level, &config->syslog_log_level); res |= sane_timer_eps(config->timer_eps); res |= sane_flush_interval(config->flush_interval); return res; }