mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:27:03 +02:00
code cleanup
This commit is contained in:
@ -42,7 +42,7 @@ static void fill_domain_table(struct __config *cfg){
|
||||
|
||||
for(i=0; i<sizeof(domains)/sizeof(char*); i++){
|
||||
snprintf(buf, sizeof(buf)-1, "insert into domain (domain, mapped) values('%s', '%s')", domains[i], domains[i]);
|
||||
p_query(&sdata, buf, cfg);
|
||||
p_query(&sdata, buf);
|
||||
}
|
||||
|
||||
close_database(&sdata);
|
||||
@ -63,7 +63,7 @@ static void restore_domain_table(struct __config *cfg){
|
||||
|
||||
for(i=0; i<sizeof(domains)/sizeof(char*); i++){
|
||||
snprintf(buf, sizeof(buf)-1, "delete from domain where domain='%s'", domains[i]);
|
||||
p_query(&sdata, buf, cfg);
|
||||
p_query(&sdata, buf);
|
||||
}
|
||||
|
||||
close_database(&sdata);
|
||||
|
@ -46,7 +46,7 @@ static void fill_rule_table(struct __config *cfg){
|
||||
printf("adding testing rules...\n");
|
||||
|
||||
for(i=0; i<sizeof(rules)/sizeof(struct rule_query); i++){
|
||||
p_query(&sdata, rules[i].query, cfg);
|
||||
p_query(&sdata, rules[i].query);
|
||||
rules[i].id = mysql_insert_id(&(sdata.mysql));
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ static void restore_rule_table(struct __config *cfg){
|
||||
|
||||
for(i=0; i<sizeof(rules)/sizeof(struct rule_query); i++){
|
||||
snprintf(buf, sizeof(buf)-1, "delete from archiving_rule where id=%llu", rules[i].id);
|
||||
p_query(&sdata, buf, cfg);
|
||||
p_query(&sdata, buf);
|
||||
}
|
||||
|
||||
close_database(&sdata);
|
||||
|
9
unit_tests/run.sh
Executable file
9
unit_tests/run.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
LD_LIBRARY_PATH=../src ./check_parser_utils
|
||||
LD_LIBRARY_PATH=../src ./check_parser
|
||||
LD_LIBRARY_PATH=../src ./check_rules
|
||||
LD_LIBRARY_PATH=../src ./check_digest
|
||||
LD_LIBRARY_PATH=../src ./check_mydomains
|
||||
|
||||
|
Reference in New Issue
Block a user