From: Sebastian Harl Date: Fri, 21 Feb 2014 01:00:21 +0000 (+0100) Subject: store_test: Clear the test after running the test-case. X-Git-Tag: sysdb-0.1.0~195 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=765d1094484e162c125788b936119808bdedd64d;p=sysdb.git store_test: Clear the test after running the test-case. This removes any cross-dependencies between multiple checks. --- diff --git a/t/core/store_test.c b/t/core/store_test.c index 855c8c0..8d484b6 100644 --- a/t/core/store_test.c +++ b/t/core/store_test.c @@ -212,7 +212,7 @@ START_TEST(test_store_service) status = sdb_store_service(golden_data[i].host, golden_data[i].svc, golden_data[i].last_update); fail_unless(status == golden_data[i].expected, - "sdb_store_attribute(%s, %s, %d) = %d; expected: %d", + "sdb_store_service(%s, %s, %d) = %d; expected: %d", golden_data[i].host, golden_data[i].svc, golden_data[i].last_update, status, golden_data[i].expected); } @@ -338,13 +338,12 @@ core_store_suite(void) TCase *tc; tc = tcase_create("core"); - /* test this first to ensure the store is empty - * even when using CK_NOFORK */ tcase_add_test(tc, test_store_tojson); tcase_add_test(tc, test_store_host); tcase_add_test(tc, test_store_get_host); tcase_add_test(tc, test_store_attr); tcase_add_test(tc, test_store_service); + tcase_add_unchecked_fixture(tc, NULL, sdb_store_clear); suite_add_tcase(s, tc); return s;