mirror of https://github.com/omar-polo/gmid.git
Compare commits
2 Commits
40ea7b163e
...
42235e3fc2
Author | SHA1 | Date |
---|---|---|
Omar Polo | 42235e3fc2 | |
Omar Polo | f53f5e5fe1 |
4
gmid.c
4
gmid.c
|
@ -605,8 +605,8 @@ main_print_conf(struct conf *conf)
|
|||
|
||||
TAILQ_FOREACH(h, &conf->hosts, vhosts) {
|
||||
printf("\nserver \"%s\" {\n", h->domain);
|
||||
printf(" cert \"%s\"\n", h->cert);
|
||||
printf(" key \"%s\"\n", h->key);
|
||||
printf(" cert \"%s\"\n", h->cert_path);
|
||||
printf(" key \"%s\"\n", h->key_path);
|
||||
/* TODO: print locations... */
|
||||
printf("}\n");
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@ fi
|
|||
run_test test_punycode
|
||||
run_test test_iri
|
||||
|
||||
# Run configuration dumping test.
|
||||
run_test test_dump_config
|
||||
|
||||
if [ "${SKIP_RUNTIME_TESTS:-0}" -eq 1 ]; then
|
||||
echo
|
||||
echo "======================"
|
||||
|
|
|
@ -8,6 +8,34 @@ test_iri() {
|
|||
./iri_test
|
||||
}
|
||||
|
||||
test_dump_config() {
|
||||
dont_check_server_alive=yes
|
||||
gen_config '' ''
|
||||
|
||||
exp="$(mktemp)"
|
||||
got="$(mktemp)"
|
||||
cat <<EOF >$exp
|
||||
prefork 3
|
||||
|
||||
server "localhost" {
|
||||
cert "$PWD/localhost.pem"
|
||||
key "$PWD/localhost.key"
|
||||
}
|
||||
EOF
|
||||
|
||||
$gmid -nn -c reg.conf > $got 2>/dev/null
|
||||
|
||||
ret=0
|
||||
if ! cmp -s "$exp" "$got"; then
|
||||
echo "config differs!" >&2
|
||||
diff -u "$exp" "$got" >&2
|
||||
ret=1
|
||||
fi
|
||||
|
||||
rm "$exp" "$got"
|
||||
return $ret
|
||||
}
|
||||
|
||||
test_gemexp() {
|
||||
dont_check_server_alive=yes
|
||||
|
||||
|
|
Loading…
Reference in New Issue