commit e3e4043ffa294f41e57c84927ea4267b2ded756b parent ced99137fe6141e65b65990348bed131e4dbba51 Author: Florian Dold <florian.dold@gmail.com> Date: Fri, 25 Nov 2016 16:54:11 +0100 skip test cases when plugin can't be loaded due to missing DB Diffstat:
| M | src/backenddb/test_merchantdb.c | | | 18 | +++++++++++++++--- |
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c @@ -301,9 +301,21 @@ run (void *cls) struct GNUNET_TIME_Absolute fake_now; /* Data for 'store_payment()' */ - FAILIF (NULL == (plugin = TALER_MERCHANTDB_plugin_load (cfg))); - (void) plugin->drop_tables (plugin->cls); - FAILIF (GNUNET_OK != plugin->initialize (plugin->cls)); + if (NULL == (plugin = TALER_MERCHANTDB_plugin_load (cfg))) + { + result = 77; + return; + } + if (GNUNET_OK != plugin->drop_tables (plugin->cls)) + { + result = 77; + return; + } + if (GNUNET_OK != plugin->initialize (plugin->cls)) + { + result = 77; + return; + } /* Prepare data for 'store_payment()' */ RND_BLK (&h_contract);