From 66d845957e3c14e4d7b83fa13115defa2bee5823 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 18 Oct 2024 16:06:48 +0000 Subject: [PATCH] tests: Make xfer tests compile again Signed-off-by: Michael Tremer --- tests/libpakfire/xfer.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/libpakfire/xfer.c b/tests/libpakfire/xfer.c index 2a280f87a..d7cc84549 100644 --- a/tests/libpakfire/xfer.c +++ b/tests/libpakfire/xfer.c @@ -43,7 +43,7 @@ static int test_create(const struct test* t) { int r = EXIT_FAILURE; // Create a new transfer - ASSERT_SUCCESS(pakfire_xfer_create(&xfer, t->ctx, t->httpclient, "file://invalid")); + ASSERT_SUCCESS(pakfire_xfer_create_simple(&xfer, t->ctx, "file://invalid")); // Everything passed r = EXIT_SUCCESS; @@ -60,7 +60,7 @@ static int test_download(const struct test* t) { int r = EXIT_FAILURE; // Create a new transfer - ASSERT_SUCCESS(pakfire_xfer_create(&xfer, t->ctx, t->httpclient, DOWNLOAD_URL)); + ASSERT_SUCCESS(pakfire_xfer_create_simple(&xfer, t->ctx, DOWNLOAD_URL)); // Run it! ASSERT_SUCCESS(pakfire_xfer_run(xfer, PAKFIRE_XFER_NO_PROGRESS)); @@ -82,7 +82,7 @@ static int test_download_into_buffer(const struct test* t) { int r = EXIT_FAILURE; // Create a new transfer - ASSERT_SUCCESS(pakfire_xfer_create(&xfer, t->ctx, t->httpclient, DOWNLOAD_URL)); + ASSERT_SUCCESS(pakfire_xfer_create_simple(&xfer, t->ctx, DOWNLOAD_URL)); // Write the data to the buffer ASSERT_SUCCESS(pakfire_xfer_set_output_buffer(xfer, &buffer, &length)); @@ -113,7 +113,7 @@ static int test_download_check_digest(const struct test* t) { int r = EXIT_FAILURE; // Create a new transfer - ASSERT_SUCCESS(pakfire_xfer_create(&xfer, t->ctx, t->httpclient, RANDOM_FILE)); + ASSERT_SUCCESS(pakfire_xfer_create_simple(&xfer, t->ctx, RANDOM_FILE)); // Write the data to the buffer ASSERT_SUCCESS(pakfire_xfer_set_output_buffer(xfer, &buffer, &length)); @@ -148,7 +148,7 @@ static int test_download_check_incorrect_digest(const struct test* t) { int r = EXIT_FAILURE; // Create a new transfer - ASSERT_SUCCESS(pakfire_xfer_create(&xfer, t->ctx, t->httpclient, RANDOM_FILE)); + ASSERT_SUCCESS(pakfire_xfer_create_simple(&xfer, t->ctx, RANDOM_FILE)); // Write the data to the buffer ASSERT_SUCCESS(pakfire_xfer_set_output_buffer(xfer, &buffer, &length)); @@ -178,7 +178,7 @@ static int test_online_download(const struct test* t) { int r = EXIT_FAILURE; // Create a new transfer - ASSERT_SUCCESS(pakfire_xfer_create(&xfer, t->ctx, t->httpclient, ONLINE_DOWNLOAD_URL)); + ASSERT_SUCCESS(pakfire_xfer_create_simple(&xfer, t->ctx, ONLINE_DOWNLOAD_URL)); // Run it! ASSERT_SUCCESS(pakfire_xfer_run(xfer, PAKFIRE_XFER_NO_PROGRESS)); @@ -195,18 +195,18 @@ FAIL: #endif /* ENABLE_ONLINE_TESTS */ int main(int argc, const char* argv[]) { - testsuite_add_test(test_create, TEST_WANTS_HTTPCLIENT); + testsuite_add_test(test_create, 0); // Download files - testsuite_add_test(test_download, TEST_WANTS_HTTPCLIENT); - testsuite_add_test(test_download_into_buffer, TEST_WANTS_HTTPCLIENT); + testsuite_add_test(test_download, 0); + testsuite_add_test(test_download_into_buffer, 0); // Check digests - testsuite_add_test(test_download_check_digest, TEST_WANTS_HTTPCLIENT); - testsuite_add_test(test_download_check_incorrect_digest, TEST_WANTS_HTTPCLIENT); + testsuite_add_test(test_download_check_digest, 0); + testsuite_add_test(test_download_check_incorrect_digest, 0); #ifdef ENABLE_ONLINE_TESTS - testsuite_add_test(test_online_download, TEST_WANTS_HTTPCLIENT); + testsuite_add_test(test_online_download, 0); #endif /* ENABLE_ONLINE_TESTS */ return testsuite_run(argc, argv); -- 2.39.5