]> git.ipfire.org Git - pakfire.git/commitdiff
tests: xfer: Fix digest check
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Nov 2023 19:06:42 +0000 (19:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Nov 2023 19:06:42 +0000 (19:06 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/xfer.c

index 39161b40dbdce95afc93cb9b246e0ddb8e6f7fc7..2a280f87ad952b3a1053b948454f8e1a8b9530ac 100644 (file)
@@ -158,11 +158,7 @@ static int test_download_check_incorrect_digest(const struct test* t) {
                RANDOM_FILE_sha2_512, sizeof(RANDOM_FILE_sha2_512)));
 
        // Run it!
-       ASSERT_FAILURE(pakfire_xfer_run(xfer, PAKFIRE_XFER_NO_PROGRESS));
-
-       // Check that the buffer contains some data
-       ASSERT(buffer);
-       ASSERT(length > 0);
+       ASSERT(pakfire_xfer_run(xfer, PAKFIRE_XFER_NO_PROGRESS) == PAKFIRE_XFER_DIGEST_MISMATCH);
 
        // Everything passed
        r = EXIT_SUCCESS;