diff --git a/tests/peerstore_test.c b/tests/peerstore_test.c index c6b75ddb..c538f70c 100644 --- a/tests/peerstore_test.c +++ b/tests/peerstore_test.c @@ -1,5 +1,6 @@ #include "peerstore/peerstore.h" -#include "testutils/testutils.h" +// #include "testutils/testutils.h" +#include "crypto/ecdsa.h" #include #include #include @@ -50,7 +51,7 @@ void peerstore_test_insert_peer(void **state) { peerstore_t *pst = peerstore_new_assert(100); for (int i = 0; i < 100; i++) { - ecdsa_private_key_t *priv_key = new_ecdsa_private_key(); + ecdsa_private_key_t *priv_key = assert_new_ecdsa_private_key(); assert(priv_key != NULL); peer_id_t *pid = libp2p_crypto_ecdsa_keypair_peerid(priv_key); assert(pid != NULL); @@ -83,7 +84,7 @@ void peerstore_test_insert_peer(void **state) { assert(pst->num_peers == 100); - ecdsa_private_key_t *priv_key = new_ecdsa_private_key(); + ecdsa_private_key_t *priv_key = assert_new_ecdsa_private_key(); assert(priv_key != NULL); peer_id_t *pid = libp2p_crypto_ecdsa_keypair_peerid(priv_key); assert(pid != NULL); diff --git a/tests/socket_test.c b/tests/socket_test.c index 4c478367..c3041006 100644 --- a/tests/socket_test.c +++ b/tests/socket_test.c @@ -16,10 +16,11 @@ #include "network/messages.h" #include "network/socket_server.h" #include "multiaddr/multiaddr.h" +#include "crypto/ecdsa.h" #include #include #include -#include +#include #include #include #include @@ -51,8 +52,8 @@ void start_socker_server_wrapper(void *data) { * @warning this test is currently leaking about 24 bytes likely because we are using two thread pools which rely on some sort of global stuff */ void test_new_socket_server(void **state) { - ecdsa_private_key_t *server1_pk = new_ecdsa_private_key(); - ecdsa_private_key_t *server2_pk = new_ecdsa_private_key(); + ecdsa_private_key_t *server1_pk = assert_new_ecdsa_private_key(); + ecdsa_private_key_t *server2_pk = assert_new_ecdsa_private_key(); int rc = libp2p_crypto_ecdsa_private_key_save(server1_pk, "server1.pem"); assert(rc == 0);