aboutsummaryrefslogtreecommitdiff
path: root/src/mintdb/test_mintdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mintdb/test_mintdb.c')
-rw-r--r--src/mintdb/test_mintdb.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/src/mintdb/test_mintdb.c b/src/mintdb/test_mintdb.c
index 88b6ec6d6..a6add0286 100644
--- a/src/mintdb/test_mintdb.c
+++ b/src/mintdb/test_mintdb.c
@@ -175,56 +175,6 @@ destroy_denom_key_pair (struct DenomKeyPair *dkp)
/**
- * Tests on the known_coins relation
- *
- * @param session the DB session
- * @return #GNUNET_OK if the tests are successful; #GNUNET_SYSERR if not.
- */
-static int
-test_known_coins (struct TALER_MINTDB_Session *session)
-{
- struct TALER_CoinPublicInfo coin_info;
- struct TALER_CoinPublicInfo ret_coin_info;
- struct DenomKeyPair *dkp;
- int ret = GNUNET_SYSERR;
-
- dkp = create_denom_key_pair (1024, session);
- RND_BLK (&coin_info);
- coin_info.denom_pub = dkp->pub;
- coin_info.denom_sig.rsa_signature =
- GNUNET_CRYPTO_rsa_sign (dkp->priv.rsa_private_key,
- "foobar", 6);
- FAILIF (GNUNET_NO !=
- plugin->get_known_coin (plugin->cls,
- session,
- &coin_info.coin_pub,
- &ret_coin_info));
- FAILIF (GNUNET_OK !=
- plugin->insert_known_coin (plugin->cls,
- session,
- &coin_info));
- FAILIF (GNUNET_YES !=
- plugin->get_known_coin (plugin->cls,
- session,
- &coin_info.coin_pub,
- &ret_coin_info));
- FAILIF (0 != GNUNET_CRYPTO_rsa_public_key_cmp
- (ret_coin_info.denom_pub.rsa_public_key,
- coin_info.denom_pub.rsa_public_key));
- FAILIF (0 != GNUNET_CRYPTO_rsa_signature_cmp
- (ret_coin_info.denom_sig.rsa_signature,
- coin_info.denom_sig.rsa_signature));
- GNUNET_CRYPTO_rsa_public_key_free (ret_coin_info.denom_pub.rsa_public_key);
- GNUNET_CRYPTO_rsa_signature_free (ret_coin_info.denom_sig.rsa_signature);
- ret = GNUNET_OK;
- drop:
- destroy_denom_key_pair (dkp);
- GNUNET_CRYPTO_rsa_signature_free (coin_info.denom_sig.rsa_signature);
- return ret;
-}
-
-
-/**
* Main function that will be run by the scheduler.
*
* @param cls closure
@@ -461,7 +411,7 @@ run (void *cls,
&refresh_session,
sizeof (refresh_session)));
}
- FAILIF (GNUNET_OK != test_known_coins (session));
+ // FAILIF (GNUNET_OK != test_known_coins (session));
result = 0;
/* FIXME: test_refresh_melts */