[ostree] tests: Drop numeric prefix
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: Drop numeric prefix
- Date: Tue, 9 Jul 2013 14:41:52 +0000 (UTC)
commit 43d69ac8a38c3c5684134685586805224716d1bf
Author: Colin Walters <walters verbum org>
Date: Tue Jul 9 10:41:07 2013 -0400
tests: Drop numeric prefix
Theoretically it's useful to have layers of tests, but in practice
it's just annoying to assign numbers.
Makefile-tests.am | 20 ++++++++++----------
src/ostree/ostree-pull.c | 16 ++++++++++++++--
...0015-admin-deploy.sh => test-admin-deploy-1.sh} | 0
...0016-admin-deploy.sh => test-admin-deploy-2.sh} | 0
tests/{t0001-archive.sh => test-archive.sh} | 0
tests/{t0002-archivez.sh => test-archivez.sh} | 0
tests/{t0000-basic.sh => test-basic.sh} | 0
tests/{t0005-corruption.sh => test-corruption.sh} | 0
tests/{t0006-libarchive.sh => test-libarchive.sh} | 0
tests/{t0003-log.sh => test-log.sh} | 0
...11-pull-archive-z.sh => test-pull-archive-z.sh} | 0
tests/{t0004-remote-add.sh => test-remote-add.sh} | 0
12 files changed, 24 insertions(+), 12 deletions(-)
---
diff --git a/Makefile-tests.am b/Makefile-tests.am
index 0b83ebe..bc976c7 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 eb7cc40..9314406 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]