diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-12-23 17:13:03 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-12-23 17:13:03 +0100 |
commit | ccb429435e162915917f2492217c4e206b9b2a96 (patch) | |
tree | 5aca18649cd45f2583593ff5799e9512c1960eb2 /tests/blogc-git-receiver | |
parent | b9ec274bed571db9c705b65bb8c0bb6409c34fc4 (diff) | |
download | blogc-ccb429435e162915917f2492217c4e206b9b2a96.tar.gz blogc-ccb429435e162915917f2492217c4e206b9b2a96.tar.bz2 blogc-ccb429435e162915917f2492217c4e206b9b2a96.zip |
blogc: common: git-receiver: improved error handling
Diffstat (limited to 'tests/blogc-git-receiver')
-rw-r--r-- | tests/blogc-git-receiver/check_post_receive.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/blogc-git-receiver/check_post_receive.c b/tests/blogc-git-receiver/check_post_receive.c index 74a9a29..8e56f98 100644 --- a/tests/blogc-git-receiver/check_post_receive.c +++ b/tests/blogc-git-receiver/check_post_receive.c @@ -31,7 +31,10 @@ __wrap_realpath(const char *path, char *resolved_path) static void test_post_receive_get_config_section(void **state) { - bc_config_t *config = bc_config_parse("", 0, NULL); + bc_error_t *err = NULL; + + bc_config_t *config = bc_config_parse("", 0, &err); + assert_null(err); assert_null(bgr_post_receive_get_config_section(config, "/home/blogc/repos/foo.git", "/home/blogc")); bc_config_free(config); @@ -48,7 +51,8 @@ test_post_receive_get_config_section(void **state) "[repo:baz.git]\n" "mirror = baz\n" "\n"; - config = bc_config_parse(conf, strlen(conf), NULL); + config = bc_config_parse(conf, strlen(conf), &err); + assert_null(err); char *s = bgr_post_receive_get_config_section(config, "/home/blogc/repos/bar.git", "/home/blogc"); assert_string_equal(s, "repo:bar.git"); @@ -67,7 +71,8 @@ test_post_receive_get_config_section(void **state) "[repo:asd/baz.git]\n" "mirror = baz\n" "\n"; - config = bc_config_parse(conf, strlen(conf), NULL); + config = bc_config_parse(conf, strlen(conf), &err); + assert_null(err); s = bgr_post_receive_get_config_section(config, "/home/blogc/repos/asd/bar.git", "/home/blogc"); assert_string_equal(s, "repo:asd/bar.git"); |