diff options
Diffstat (limited to 'tests/test_artifactory.c')
-rw-r--r-- | tests/test_artifactory.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_artifactory.c b/tests/test_artifactory.c index 2c732fa..4af7eec 100644 --- a/tests/test_artifactory.c +++ b/tests/test_artifactory.c @@ -2,9 +2,7 @@ #include "artifactory.h" #include "delivery.h" -// Import private functions from core -extern int delivery_init_platform(struct Delivery *ctx); -extern int populate_delivery_cfg(struct Delivery *ctx, int render_mode); + struct JFRT_Auth gauth; struct JFRT_Auth gnoauth; @@ -73,11 +71,12 @@ int main(int argc, char *argv[]) { memset(&gnoauth, 0, sizeof(gnoauth)); memset(&ctx, 0, sizeof(ctx)); - const char *basedir = realpath(".", NULL); + char *basedir = realpath(".", NULL); const char *ws = "workspace"; mkdir(ws, 0755); if (pushd(ws)) { SYSERROR("failed to change directory to %s", ws); + guard_free(basedir); STASIS_ASSERT_FATAL(true, "workspace creation failed"); } @@ -107,6 +106,7 @@ int main(int argc, char *argv[]) { ctx._stasis_ini_fp.cfg = ini_open(cfg_path); if (!ctx._stasis_ini_fp.cfg) { SYSERROR("%s: configuration is invalid", cfg_path); + guard_free(basedir); return STASIS_TEST_SUITE_SKIP; } delivery_init_platform(&ctx); @@ -118,6 +118,7 @@ int main(int argc, char *argv[]) { SYSERROR("%s", "Not configured to test Artifactory. Skipping."); return STASIS_TEST_SUITE_SKIP; } + guard_free(basedir); STASIS_TEST_FUNC *tests[] = { test_jfrog_cli_rt_ping, |