]> git.ipfire.org Git - pakfire.git/commitdiff
tests: Update downloader function calls
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Apr 2021 09:09:06 +0000 (09:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Apr 2021 09:09:06 +0000 (09:09 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/downloader.c

index 6736fbdfd1afc30b9e12b8dd1a6fcec4c934b6b8..784f21d3d3a0e086d639ee18277725bfc8e4e217 100644 (file)
@@ -36,7 +36,7 @@ static int test_simple(const struct test* t) {
        ASSERT(r == 0);
 
        // Retrieve a file
-       r = pakfire_downloader_retrieve(d, NULL, DOWNLOAD_URL, DOWNLOAD_PATH);
+       r = pakfire_downloader_retrieve(d, NULL, NULL, NULL, DOWNLOAD_URL, DOWNLOAD_PATH, 0);
        ASSERT(r == 0);
 
        // Cleanup
@@ -53,11 +53,11 @@ static int test_retrieve_with_pending_transfers(const struct test* t) {
        ASSERT(r == 0);
 
        // Add a transfer
-       r = pakfire_downloader_add_transfer(d, NULL, DOWNLOAD_URL, DOWNLOAD_PATH);
+       r = pakfire_downloader_add_transfer(d, NULL, NULL, NULL, DOWNLOAD_URL, DOWNLOAD_PATH, 0);
        ASSERT(r == 0);
 
        // Retrieve a file
-       r = pakfire_downloader_retrieve(d, NULL, DOWNLOAD_URL, DOWNLOAD_PATH);
+       r = pakfire_downloader_retrieve(d, NULL, NULL, NULL, DOWNLOAD_URL, DOWNLOAD_PATH, 0);
        ASSERT(r == 0);
 
        // Cleanup
@@ -87,7 +87,8 @@ static int test_retrieve_with_mirrors(const struct test* t) {
        //ASSERT_FAILURE(pakfire_downloader_retrieve(d, m, "doesnt-exist.pfm", DOWNLOAD_PATH));
 
        // Retrieve a file which exists
-       ASSERT_SUCCESS(pakfire_downloader_retrieve(d, m, "beep-1.3-2.ip3.x86_64.pfm", DOWNLOAD_PATH));
+       ASSERT_SUCCESS(pakfire_downloader_retrieve(d, NULL, m,
+               NULL, "beep-1.3-2.ip3.x86_64.pfm", DOWNLOAD_PATH, 0));
 
        // Cleanup
        ASSERT_NULL(pakfire_mirrorlist_unref(m));