diff --git a/Makefile-tests.am b/Makefile-tests.am index 0b83ebea..bc976c7b 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -20,16 +20,16 @@ if BUILDOPT_INSTALL_TESTS insttestdir=$(pkglibexecdir)/installed-tests -testfiles = t0000-basic \ - t0001-archive \ - t0002-archivez \ - t0003-log \ - t0004-remote-add \ - t0005-corruption \ - t0006-libarchive \ - t0011-pull-archive-z \ - t0015-admin-deploy \ - t0016-admin-deploy \ +testfiles = test-basic \ + test-archive \ + test-archivez \ + test-log \ + test-remote-add \ + test-corruption \ + test-libarchive \ + test-pull-archive-z \ + test-admin-deploy-1 \ + test-admin-deploy-2 \ $(NULL) insttest_SCRIPTS = $(addprefix tests/,$(testfiles:=.sh)) diff --git a/src/ostree/ostree-pull.c b/src/ostree/ostree-pull.c index eb7cc403..9314406f 100644 --- a/src/ostree/ostree-pull.c +++ b/src/ostree/ostree-pull.c @@ -590,7 +590,13 @@ content_fetch_on_stage_complete (GObject *object, g_debug ("stage of %s complete", ostree_object_to_string (checksum, objtype)); - g_assert (strcmp (checksum, expected_checksum) == 0); + if (strcmp (checksum, expected_checksum) != 0) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Corrupted content object; checksum expected='%s' actual='%s'", + expected_checksum, checksum); + goto out; + } pull_data->n_fetched_content++; out: @@ -678,7 +684,13 @@ on_metadata_staged (GObject *object, g_debug ("stage of %s complete", ostree_object_to_string (checksum, objtype)); - g_assert (strcmp (checksum, expected_checksum) == 0); + if (strcmp (checksum, expected_checksum) != 0) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Corrupted metadata object; checksum expected='%s' actual='%s'", + expected_checksum, checksum); + goto out; + } pull_data->metadata_scan_idle = FALSE; ot_waitable_queue_push (pull_data->metadata_objects_to_scan, diff --git a/tests/t0015-admin-deploy.sh b/tests/test-admin-deploy-1.sh similarity index 100% rename from tests/t0015-admin-deploy.sh rename to tests/test-admin-deploy-1.sh diff --git a/tests/t0016-admin-deploy.sh b/tests/test-admin-deploy-2.sh similarity index 100% rename from tests/t0016-admin-deploy.sh rename to tests/test-admin-deploy-2.sh diff --git a/tests/t0001-archive.sh b/tests/test-archive.sh similarity index 100% rename from tests/t0001-archive.sh rename to tests/test-archive.sh diff --git a/tests/t0002-archivez.sh b/tests/test-archivez.sh similarity index 100% rename from tests/t0002-archivez.sh rename to tests/test-archivez.sh diff --git a/tests/t0000-basic.sh b/tests/test-basic.sh similarity index 100% rename from tests/t0000-basic.sh rename to tests/test-basic.sh diff --git a/tests/t0005-corruption.sh b/tests/test-corruption.sh similarity index 100% rename from tests/t0005-corruption.sh rename to tests/test-corruption.sh diff --git a/tests/t0006-libarchive.sh b/tests/test-libarchive.sh similarity index 100% rename from tests/t0006-libarchive.sh rename to tests/test-libarchive.sh diff --git a/tests/t0003-log.sh b/tests/test-log.sh similarity index 100% rename from tests/t0003-log.sh rename to tests/test-log.sh diff --git a/tests/t0011-pull-archive-z.sh b/tests/test-pull-archive-z.sh similarity index 100% rename from tests/t0011-pull-archive-z.sh rename to tests/test-pull-archive-z.sh diff --git a/tests/t0004-remote-add.sh b/tests/test-remote-add.sh similarity index 100% rename from tests/t0004-remote-add.sh rename to tests/test-remote-add.sh