aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-git-receiver/check_settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/blogc-git-receiver/check_settings.c')
-rw-r--r--tests/blogc-git-receiver/check_settings.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/blogc-git-receiver/check_settings.c b/tests/blogc-git-receiver/check_settings.c
index cb12037..6de5b32 100644
--- a/tests/blogc-git-receiver/check_settings.c
+++ b/tests/blogc-git-receiver/check_settings.c
@@ -12,8 +12,8 @@
#include <cmocka.h>
#include <string.h>
#include <stdlib.h>
-#include "../../src/common/config-parser.h"
-#include "../../src/common/utils.h"
+#include <squareball.h>
+
#include "../../src/blogc-git-receiver/settings.h"
@@ -24,21 +24,21 @@ __wrap_realpath(const char *path, char *resolved_path)
if (real_path == NULL)
return NULL;
assert_string_equal(path, real_path);
- return bc_strdup(real_path);
+ return sb_strdup(real_path);
}
static void
test_settings_get_section(void **state)
{
- bc_error_t *err = NULL;
+ sb_error_t *err = NULL;
setenv("HOME", "/home/blogc", 1);
- bc_config_t *config = bc_config_parse("", 0, NULL, &err);
+ sb_config_t *config = sb_config_parse("", 0, NULL, &err);
assert_null(err);
assert_null(bgr_settings_get_section(config, "/home/blogc/repos/foo.git"));
- bc_config_free(config);
+ sb_config_free(config);
will_return(__wrap_realpath, NULL);
will_return(__wrap_realpath, "/home/blogc/repos/bar.git");
@@ -52,12 +52,12 @@ test_settings_get_section(void **state)
"[repo:baz.git]\n"
"mirror = baz\n"
"\n";
- config = bc_config_parse(conf, strlen(conf), NULL, &err);
+ config = sb_config_parse(conf, strlen(conf), NULL, &err);
assert_null(err);
char *s = bgr_settings_get_section(config, "/home/blogc/repos/bar.git");
assert_string_equal(s, "repo:bar.git");
free(s);
- bc_config_free(config);
+ sb_config_free(config);
setenv("BLOGC_GIT_RECEIVER_BASE_DIR", "/home/bola", 1);
will_return(__wrap_realpath, NULL);
@@ -72,12 +72,12 @@ test_settings_get_section(void **state)
"[repo:asd/baz.git]\n"
"mirror = baz\n"
"\n";
- config = bc_config_parse(conf, strlen(conf), NULL, &err);
+ config = sb_config_parse(conf, strlen(conf), NULL, &err);
assert_null(err);
s = bgr_settings_get_section(config, "/home/bola/repos/asd/bar.git");
assert_string_equal(s, "repo:asd/bar.git");
free(s);
- bc_config_free(config);
+ sb_config_free(config);
}