]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Unit tests: Patch and update
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 29 Dec 2021 17:21:47 +0000 (11:21 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 29 Dec 2021 17:21:47 +0000 (11:21 -0600)
13 files changed:
src/data_structure/path_builder.c
src/object/manifest.c
src/rrdp/delta.c
src/rrdp/notification.c
src/rrdp/snapshot.c
src/types/uri.c
src/xml/relax_ng.c
src/xml/relax_ng.h
test/Makefile.am
test/rrdp_objects_test.c
test/rsync_test.c [deleted file]
test/tal_test.c
test/types/uri_test.c

index 85395c411117f6e65d9b22544456e2b9284ff6a3..9412908b8e13ca3f4b2c791dd23535be06bd4264 100644 (file)
@@ -12,14 +12,7 @@ path_init(struct path_builder *pb)
        pb->string = malloc(INITIAL_CAPACITY);
        pb->len = 0;
        pb->capacity = INITIAL_CAPACITY;
-       pb->error = (pb->string != NULL) ? pr_enomem() : 0;
-}
-
-static void
-fail(struct path_builder *pb, int error)
-{
-       free(pb->string);
-       pb->error = error;
+       pb->error = (pb->string != NULL) ? 0 : pr_enomem();
 }
 
 static void
@@ -33,8 +26,9 @@ add(struct path_builder *pb, char const *addend, size_t addend_len)
        total_len = pb->len + addend_len;
        if (total_len > pb->capacity) {
                if (total_len > MAX_CAPACITY) {
-                       fail(pb, pr_val_err("Path too long: %zu > %u characters.",
-                           total_len, MAX_CAPACITY));
+                       free(pb->string);
+                       pb->error = pr_val_err("Path too long: %zu > %u characters.",
+                           total_len, MAX_CAPACITY);
                        return;
                }
 
@@ -45,7 +39,7 @@ add(struct path_builder *pb, char const *addend, size_t addend_len)
                pb->capacity = total_len;
                pb->string = realloc(pb->string, pb->capacity);
                if (pb->string == NULL) {
-                       fail(pb, pr_enomem());
+                       pb->error = pr_enomem();
                        return;
                }
        }
index 83dbc3bda05ddce51508ba36d19146e687a32baa..563dfb3b0130008bafae3be2d66951f80adecd7f 100644 (file)
@@ -164,7 +164,6 @@ build_rpp(struct Manifest *mft, struct rpki_uri *mft_uri, struct rpp **pp)
        for (i = 0; i < mft->fileList.list.count; i++) {
                fah = mft->fileList.list.array[i];
 
-               /* TODO (aaaa) where's the file validation? */
                error = uri_create_mft(mft_uri, &fah->file, &uri);
                if (error)
                        goto fail;
index 3b93e622c87aa3649e779935e9c90aede99ead0a..afe48bdc86b0a792dce7ffa2a78284f68ad171a2 100644 (file)
@@ -107,7 +107,7 @@ process_delta(struct rrdp_notification_delta *deltas,
 
        ctx.notification = notification;
        ctx.expected_serial = deltas->serial;
-       error = relax_ng_parse(uri, xml_read_delta, &ctx);
+       error = relax_ng_parse(uri_get_local(uri), xml_read_delta, &ctx);
 
 pop:   fnstack_pop();
        pr_val_debug("}");
index 88b96da82768e0cb60c94d5d8c7948252b5351de..b87a1ae16ac1d937de91f43c7af7d581295e67c4 100644 (file)
@@ -136,8 +136,8 @@ read_notification(struct rrdp_notification *notification)
 {
        int error;
 
-       error = relax_ng_parse(notification->uri, xml_read_notification,
-           notification);
+       error = relax_ng_parse(uri_get_local(notification->uri),
+           xml_read_notification, notification);
        if (error)
                return error;
 
index a1d883a9c770c662c9cf3529983bf0072e08f478..d36db2c09192b83cb2b9dce75d1f0452a7b10068 100644 (file)
@@ -47,7 +47,8 @@ rrdp_parse_snapshot(struct rrdp_notification *notification)
        if (error)
                goto pop;
 
-       error = relax_ng_parse(uri, xml_read_snapshot, notification);
+       error = relax_ng_parse(uri_get_local(uri), xml_read_snapshot,
+           notification);
 
 pop:   fnstack_pop();
        pr_val_debug("}");
index 5e8aa4bdbabdb0a3d239fdfce628cfceb8d48d3c..4eae271ab5a4d18a5e9062cb10624f29b25a4f37 100644 (file)
@@ -145,6 +145,43 @@ uri_create_caged(char *global, struct rpki_uri *notification,
        return 0;
 }
 
+static bool
+is_valid_mft_file_chara(uint8_t chara)
+{
+       return ('a' <= chara && chara <= 'z')
+           || ('A' <= chara && chara <= 'Z')
+           || ('0' <= chara && chara <= '9')
+           || (chara == '-')
+           || (chara == '_');
+}
+
+/* RFC 6486bis, section 4.2.2 */
+static int
+validate_mft_file(IA5String_t *ia5)
+{
+       size_t dot;
+       size_t i;
+
+       if (ia5->size < 5)
+               return pr_val_err("File name is too short (%zu < 5).", ia5->size);
+       dot = ia5->size - 4;
+       if (ia5->buf[dot] != '.')
+               return pr_val_err("File name seems to lack a three-letter extension.");
+
+       for (i = 0; i < ia5->size; i++) {
+               if (i != dot && !is_valid_mft_file_chara(ia5->buf[i])) {
+                       return pr_val_err("File name contains illegal character #%u",
+                           ia5->buf[i]);
+               }
+       }
+
+       /*
+        * Actual extension doesn't matter; if there's no handler,
+        * we'll naturally ignore the file.
+        */
+       return 0;
+}
+
 static int
 create_neighbor(char const *prefix, IA5String_t *suffix, char **result)
 {
@@ -163,6 +200,10 @@ uri_create_mft(struct rpki_uri *mft, IA5String_t *file,
        char *global;
        int error;
 
+       error = validate_mft_file(file);
+       if (error)
+               return error;
+
        error = create_neighbor(uri_get_global(mft), file, &global);
        if (error)
                return error;
index 05413150a6f810d8971afa6d6e6dce8c7636d5ca..196555011a761d0b82ae10b1521a2e2165b56ca3 100644 (file)
@@ -83,18 +83,16 @@ cleanup_parser:
  * parsed using @cb (will receive @arg as argument).
  */
 int
-relax_ng_parse(struct rpki_uri *uri, xml_read_cb cb, void *arg)
+relax_ng_parse(char const *path, xml_read_cb cb, void *arg)
 {
        xmlTextReaderPtr reader;
        xmlRelaxNGValidCtxtPtr rngvalidctx;
        int read;
        int error;
 
-       reader = xmlNewTextReaderFilename(uri_get_local(uri));
-       if (reader == NULL) {
-               return pr_val_err("Couldn't get XML '%s' file.",
-                   uri_get_local(uri));
-       }
+       reader = xmlNewTextReaderFilename(path);
+       if (reader == NULL)
+               return pr_val_err("Couldn't get XML '%s' file.", path);
 
        error = xmlTextReaderRelaxNGSetSchema(reader, schema);
        if (error) {
index a4e5e4edd8cb1a2eea0ba5d378deded2036d5bd5..68af1a3874dcb39015e94923b1a5702bf0d9cbd2 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <libxml/xmlreader.h>
 #include <string.h>
-#include "types/uri.h"
 
 /*
  * Schema obtained from RFC 8182, converted using the tool rnc2rng
@@ -168,7 +167,7 @@ int relax_ng_init(void);
 void relax_ng_cleanup(void);
 
 typedef int (*xml_read_cb)(xmlTextReaderPtr, void *);
-int relax_ng_parse(struct rpki_uri *, xml_read_cb cb, void *);
+int relax_ng_parse(char const *, xml_read_cb cb, void *);
 
 int xml_parse_long(xmlTextReaderPtr, char const *, unsigned long *);
 
index 8cc0bbd492793e579e80bc38773589450af73d2b..63a810e6ead540f73957760b063dd53120406cec 100644 (file)
@@ -25,7 +25,6 @@ check_PROGRAMS += db_table.test
 check_PROGRAMS += line_file.test
 check_PROGRAMS += pdu_handler.test
 check_PROGRAMS += rrdp_objects.test
-check_PROGRAMS += rsync.test
 check_PROGRAMS += serial.test
 check_PROGRAMS += tal.test
 check_PROGRAMS += thread_pool.test
@@ -55,9 +54,6 @@ pdu_handler_test_LDADD = ${MY_LDADD} ${JANSSON_LIBS}
 rrdp_objects_test_SOURCES = rrdp_objects_test.c
 rrdp_objects_test_LDADD = ${MY_LDADD} ${JANSSON_LIBS} ${XML2_LIBS}
 
-rsync_test_SOURCES = rsync_test.c
-rsync_test_LDADD = ${MY_LDADD}
-
 serial_test_SOURCES = types/serial_test.c
 serial_test_LDADD = ${MY_LDADD}
 
index 4dedf976e12a1d19a7f40cfe7c155ab0b0c2926f..6a98face4a72843d91a5b620245af75079d8e2a0 100644 (file)
@@ -5,9 +5,56 @@
 #include "impersonator.c"
 #include "log.c"
 #include "rrdp/notification.c"
+#include "rrdp/types.c"
+#include "types/uri.c"
+#include "data_structure/path_builder.c"
 
 #define END 0xFFFF
 
+int
+relax_ng_parse(char const *path, xml_read_cb cb, void *arg)
+{
+       pr_crit("Not supposed to be called.");
+}
+
+long
+file_get_modification_time(char const *luri)
+{
+       pr_crit("Not supposed to be called.");
+}
+
+int
+http_get(struct rpki_uri *uri, long ims)
+{
+       pr_crit("Not supposed to be called.");
+}
+
+int
+xml_parse_long(xmlTextReaderPtr reader, char const *attr, unsigned long *result)
+{
+       pr_crit("Not supposed to be called.");
+}
+
+int
+hash_validate_file(char const *algorithm, struct rpki_uri *uri,
+    unsigned char const *expected, size_t expected_len)
+{
+       pr_crit("Not supposed to be called.");
+}
+
+int
+create_dir_recursive(char const *path)
+{
+       pr_crit("Not supposed to be called.");
+}
+
+int
+base64_decode(BIO *in, unsigned char *out, bool has_nl, size_t out_len,
+    size_t *out_written)
+{
+       pr_crit("Not supposed to be called.");
+}
+
 static void
 add_serials(struct rrdp_notification_deltas *deltas, ...)
 {
@@ -44,7 +91,7 @@ START_TEST(test_deltas_head_sort)
 {
        struct rrdp_notification_deltas deltas;
 
-       deltas_head_init(&deltas);
+       rrdp_notification_deltas_init(&deltas);
        ck_assert_int_eq(0, deltas_head_sort(&deltas, 0));
        ck_assert_int_eq(0, deltas_head_sort(&deltas, 1));
        ck_assert_int_eq(0, deltas_head_sort(&deltas, 2));
@@ -63,15 +110,15 @@ START_TEST(test_deltas_head_sort)
        ck_assert_int_eq(-EINVAL, deltas_head_sort(&deltas, 4));
        ck_assert_int_eq(-EINVAL, deltas_head_sort(&deltas, 2));
 
-       deltas_head_cleanup(&deltas, NULL);
-       deltas_head_init(&deltas);
+       rrdp_notification_deltas_cleanup(&deltas, NULL);
+       rrdp_notification_deltas_init(&deltas);
 
        add_serials(&deltas, 3, 0, 1, 2, END);
        ck_assert_int_eq(0, deltas_head_sort(&deltas, 3));
        validate_serials(&deltas, 0, 1, 2, 3, END);
 
-       deltas_head_cleanup(&deltas, NULL);
-       deltas_head_init(&deltas);
+       rrdp_notification_deltas_cleanup(&deltas, NULL);
+       rrdp_notification_deltas_init(&deltas);
 
        add_serials(&deltas, 4, 3, 2, 1, 0, END);
        ck_assert_int_eq(0, deltas_head_sort(&deltas, 4));
@@ -80,7 +127,7 @@ START_TEST(test_deltas_head_sort)
        ck_assert_int_eq(-EINVAL, deltas_head_sort(&deltas, 5));
        ck_assert_int_eq(-EINVAL, deltas_head_sort(&deltas, 3));
 
-       deltas_head_cleanup(&deltas, NULL);
+       rrdp_notification_deltas_cleanup(&deltas, NULL);
 }
 END_TEST
 
diff --git a/test/rsync_test.c b/test/rsync_test.c
deleted file mode 100644 (file)
index 62ffef4..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-#include <check.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "common.c"
-#include "log.c"
-#include "impersonator.c"
-#include "str_token.c"
-#include "types/uri.c"
-#include "rsync/rsync.c"
-
-
-struct validation *
-state_retrieve(void)
-{
-       return NULL;
-}
-
-static void
-assert_descendant(bool expected, char *ancestor, char *descendant)
-{
-       struct rpki_uri *ancestor_uri;
-       struct rpki_uri *descendant_uri;
-
-       ck_assert_int_eq(0, uri_create_rsync(&ancestor_uri, ancestor));
-       ck_assert_int_eq(0, uri_create_rsync(&descendant_uri, descendant));
-
-       ck_assert_int_eq(is_descendant(ancestor_uri, descendant_uri), expected);
-
-       uri_refput(ancestor_uri);
-       uri_refput(descendant_uri);
-}
-
-START_TEST(rsync_test_prefix_equals)
-{
-       char *ancestor;
-
-       ancestor = "rsync://a/b/c";
-       assert_descendant(true, ancestor, "rsync://a/b/c");
-       assert_descendant(false, ancestor, "rsync://a/b/");
-       assert_descendant(true, ancestor, "rsync://a/b/c/c");
-       assert_descendant(false, ancestor, "rsync://a/b/cc");
-       assert_descendant(false, ancestor, "rsync://a/b/cc/");
-
-       ancestor = "rsync://a/b/c/";
-       assert_descendant(true, ancestor, "rsync://a/b/c");
-       assert_descendant(false, ancestor, "rsync://a/b/");
-       assert_descendant(true, ancestor, "rsync://a/b/c/c");
-       assert_descendant(false, ancestor, "rsync://a/b/cc");
-       assert_descendant(false, ancestor, "rsync://a/b/cc/");
-}
-END_TEST
-
-static void
-__mark_as_downloaded(char *uri_str, struct uri_list *visited_uris)
-{
-       struct rpki_uri *uri;
-       ck_assert_int_eq(0, uri_create_rsync(&uri, uri_str));
-       ck_assert_int_eq(mark_as_downloaded(uri, visited_uris), 0);
-       uri_refput(uri);
-}
-
-static void
-assert_downloaded(char *uri_str, struct uri_list *visited_uris, bool expected)
-{
-       struct rpki_uri *uri;
-       ck_assert_int_eq(0, uri_create_rsync(&uri, uri_str));
-       ck_assert_int_eq(is_already_downloaded(uri, visited_uris), expected);
-       uri_refput(uri);
-}
-
-START_TEST(rsync_test_list)
-{
-       struct uri_list *visited_uris;
-
-       ck_assert_int_eq(rsync_create(&visited_uris), 0);
-
-       __mark_as_downloaded("rsync://example.foo/repository/", visited_uris);
-       __mark_as_downloaded("rsync://example.foo/member_repository/",
-           visited_uris);
-       __mark_as_downloaded("rsync://example.foz/repository/", visited_uris);
-       __mark_as_downloaded("rsync://example.boo/repo/", visited_uris);
-       __mark_as_downloaded("rsync://example.potato/rpki/", visited_uris);
-
-       assert_downloaded("rsync://example.foo/repository/", visited_uris,
-           true);
-       assert_downloaded("rsync://example.foo/repository/abc/cdfg",
-           visited_uris, true);
-       assert_downloaded("rsync://example.foo/member_repository/bca",
-           visited_uris, true);
-       assert_downloaded("rsync://example.boo/repository/", visited_uris,
-           false);
-       assert_downloaded("rsync://example.potato/repository/", visited_uris,
-           false);
-       assert_downloaded("rsync://example.potato/rpki/abc/", visited_uris,
-           true);
-
-       rsync_destroy(visited_uris);
-}
-END_TEST
-
-static void
-test_root_strategy(char *test, char *expected)
-{
-       struct rpki_uri *src;
-       struct rpki_uri *dst;
-
-       ck_assert_int_eq(0, uri_create_rsync(&src, test));
-       ck_assert_int_eq(handle_root_strategy(src, &dst), 0);
-       ck_assert_str_eq(uri_get_global(dst), expected);
-
-       uri_refput(src);
-       uri_refput(dst);
-}
-
-START_TEST(rsync_test_get_prefix)
-{
-       test_root_strategy("rsync://www.example1.com/test/foo/",
-           "rsync://www.example1.com/test");
-       test_root_strategy("rsync://www.example1.com/test/foo/bar",
-           "rsync://www.example1.com/test");
-       test_root_strategy("rsync://www.example1.com/test/",
-           "rsync://www.example1.com/test");
-       test_root_strategy("rsync://www.example1.com/test",
-           "rsync://www.example1.com/test");
-       test_root_strategy("rsync://www.example1.com",
-           "rsync://www.example1.com");
-       test_root_strategy("rsync://w", "rsync://w");
-       test_root_strategy("rsync://", "rsync://");
-}
-END_TEST
-
-Suite *rsync_load_suite(void)
-{
-       Suite *suite;
-       TCase *prefix_equals, *uri_list, *test_get_prefix;
-
-       prefix_equals = tcase_create("PrefixEquals");
-       tcase_add_test(prefix_equals, rsync_test_prefix_equals);
-
-       uri_list = tcase_create("uriList");
-       tcase_add_test(uri_list, rsync_test_list);
-
-       test_get_prefix = tcase_create("test_get_prefix");
-       tcase_add_test(test_get_prefix, rsync_test_get_prefix);
-
-       suite = suite_create("rsync_test()");
-       suite_add_tcase(suite, prefix_equals);
-       suite_add_tcase(suite, uri_list);
-       suite_add_tcase(suite, test_get_prefix);
-
-       return suite;
-}
-
-int main(void)
-{
-       Suite *suite;
-       SRunner *runner;
-       int tests_failed;
-
-       suite = rsync_load_suite();
-
-       runner = srunner_create(suite);
-       srunner_run_all(runner, CK_NORMAL);
-       tests_failed = srunner_ntests_failed(runner);
-       srunner_free(runner);
-
-       return (tests_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
index 7079a5d00f6822cb07f9d25a9146d96c054394f7..4e5901907121ec2321cb7140414180fb156870a1 100644 (file)
 #include "impersonator.c"
 #include "line_file.c"
 #include "log.c"
-#include "state.h"
-#include "str_token.c"
-#include "random.c"
 #include "types/uri.c"
+#include "types/uri_list.c"
+#include "data_structure/path_builder.c"
 #include "crypto/base64.c"
-#include "rsync/rsync.c"
-#include "thread/thread_pool.c"
 
 /* Impersonate functions that won't be utilized by tests */
 
 int
-validation_prepare(struct validation **out, struct tal *tal,
-    struct validation_handler *validation_handler)
+http_get(struct rpki_uri *uri, long ims)
 {
-       return 0;
+       pr_crit("Not supposed to be called.");
 }
 
 int
-certificate_traverse(struct rpp *rpp_parent, struct rpki_uri *cert_uri)
+rsync_download_files(struct rpki_uri *uri, bool is_file)
 {
-       return -EINVAL;
+       pr_crit("Not supposed to be called.");
 }
 
-enum pubkey_state
-validation_pubkey_state(struct validation *state)
+int
+rrdp_update(struct rpki_uri *uri)
 {
-       return PKS_INVALID;
+       pr_crit("Not supposed to be called.");
 }
 
-void
-validation_destroy(struct validation *state)
+int
+validation_prepare(struct tal *tal,
+    struct validation_handler *validation_handler)
 {
-       /* Nothing to destroy */
+       pr_crit("Not supposed to be called.");
 }
 
 int
-process_file_or_dir(char const *location, char const *file_ext, bool empty_err,
-    process_file_cb cb, void *arg)
+certificate_traverse(struct rpp *rpp_parent, struct rpki_uri *cert_uri)
+{
+       pr_crit("Not supposed to be called.");
+}
+
+enum pubkey_state
+validation_pubkey_state(struct validation *state)
 {
-       return 0;
+       pr_crit("Not supposed to be called.");
 }
 
 void
-close_thread(pthread_t thread, char const *what)
+validation_destroy(struct validation *state)
 {
-       /* Nothing to close */
+       pr_crit("Not supposed to be called.");
 }
 
 int
-autocomplete_local_rsync(char const *uri, char const *uri_prefix, char const *workspace,
-    char **result)
+process_file_or_dir(char const *location, char const *file_ext, bool empty_err,
+    process_file_cb cb, void *arg)
 {
-       /* These tests focus on global URIs, so set a dummy value */
-       *result = strdup("dummy");
-       if (*result == NULL)
-               return -ENOMEM;
-       return 0;
+       pr_crit("Not supposed to be called.");
 }
 
 void
 fnstack_init(void)
 {
-       /* Empty */
+       pr_crit("Not supposed to be called.");
 }
 
 void
 fnstack_cleanup(void)
 {
-       /* Empty */
+       pr_crit("Not supposed to be called.");
 }
 
 void
 fnstack_pop(void)
 {
-       /* Empty */
+       pr_crit("Not supposed to be called.");
 }
 
 void
 fnstack_push(char const *file)
 {
-       /* Empty */
-}
-
-struct validation *
-state_retrieve(void)
-{
-       return NULL;
-}
-
-void
-db_rrdp_reset_visited_tals(void)
-{
-       /* Empty */
+       pr_crit("Not supposed to be called.");
 }
 
 void
-db_rrdp_rem_nonvisited_tals(void)
+thread_pool_wait(struct thread_pool *pool)
 {
-       /* Empty */
+       pr_crit("Not supposed to be called.");
 }
 
 START_TEST(tal_load_normal)
@@ -147,11 +133,11 @@ START_TEST(tal_load_normal)
 
        ck_assert_int_eq(tal_load("tal/lacnic.tal", &tal), 0);
 
-       ck_assert_uint_eq(tal->uris.count, 3);
-       ck_assert_str_eq(tal->uris.array[0]->global,
+       ck_assert_uint_eq(tal->ta.len, 3);
+       ck_assert_str_eq(uri_get_global(tal->ta.array[0]),
            "rsync://repository.lacnic.net/rpki/lacnic/rta-lacnic-rpki.cer");
-       ck_assert_str_eq(tal->uris.array[1]->global, "https://potato");
-       ck_assert_str_eq(tal->uris.array[2]->global, "rsync://potato");
+       ck_assert_str_eq(uri_get_global(tal->ta.array[1]), "https://potato");
+       ck_assert_str_eq(uri_get_global(tal->ta.array[2]), "rsync://potato");
 
        ck_assert_uint_eq(ARRAY_LEN(decoded), tal->spki_len);
        for (i = 0; i < ARRAY_LEN(decoded); i++)
@@ -161,59 +147,16 @@ START_TEST(tal_load_normal)
 }
 END_TEST
 
-START_TEST(tal_order_http_first)
-{
-       struct tal *tal;
-
-       ck_assert_int_eq(tal_load("tal/lacnic.tal", &tal), 0);
-
-       config_set_http_priority(60);
-       config_set_rsync_priority(50);
-       ck_assert_int_eq(tal_order_uris(tal), 0);
-
-       ck_assert_str_eq(tal->uris.array[0]->global, "https://potato");
-       ck_assert_str_eq(tal->uris.array[1]->global,
-           "rsync://repository.lacnic.net/rpki/lacnic/rta-lacnic-rpki.cer");
-       ck_assert_str_eq(tal->uris.array[2]->global, "rsync://potato");
-
-       tal_destroy(tal);
-}
-END_TEST
-
-START_TEST(tal_order_http_last)
-{
-       struct tal *tal;
-
-       ck_assert_int_eq(tal_load("tal/lacnic.tal", &tal), 0);
-
-       config_set_http_priority(50);
-       config_set_rsync_priority(60);
-       ck_assert_int_eq(tal_order_uris(tal), 0);
-
-       ck_assert_str_eq(tal->uris.array[0]->global,
-           "rsync://repository.lacnic.net/rpki/lacnic/rta-lacnic-rpki.cer");
-       ck_assert_str_eq(tal->uris.array[1]->global, "rsync://potato");
-       ck_assert_str_eq(tal->uris.array[2]->global, "https://potato");
-
-       tal_destroy(tal);
-}
-END_TEST
-
 Suite *tal_load_suite(void)
 {
        Suite *suite;
-       TCase *core, *order;
+       TCase *core;
 
        core = tcase_create("Core");
        tcase_add_test(core, tal_load_normal);
 
-       order = tcase_create("Order");
-       tcase_add_test(order, tal_order_http_first);
-       tcase_add_test(order, tal_order_http_last);
-
        suite = suite_create("tal_load()");
        suite_add_tcase(suite, core);
-       suite_add_tcase(suite, order);
        return suite;
 }
 
index 6604d2e6b08b32750767660d827b94ea01612b44..04bad1b14d7afea0d0bfd48d49961ed4272b100f 100644 (file)
@@ -6,6 +6,7 @@
 #include "log.c"
 #include "impersonator.c"
 #include "types/uri.c"
+#include "data_structure/path_builder.c"
 
 #define BUFFER_LEN 128
 static uint8_t buffer[BUFFER_LEN];