update test for extension

This commit is contained in:
Özgür Kesim 2022-01-11 15:28:40 +01:00
parent fea5bee835
commit 5825f8b4ef
Signed by: oec
GPG Key ID: 3D76A56D79EDD9D7

View File

@ -126,7 +126,6 @@ test_extension_config (void)
&sig));
sig.eddsa_signature.r[23] = 0x23;
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->set_extension_config (plugin->cls,
"fnord",
@ -134,7 +133,6 @@ test_extension_config (void)
&sig));
memset (&sig, 0, sizeof(sig));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->get_extension_config (plugin->cls,
"fnord",
@ -142,9 +140,27 @@ test_extension_config (void)
&sig));
FAILIF (0 != strcmp ("bar", config));
FAILIF (0x23 != sig.eddsa_signature.r[23]);
/* let's do this again! */
memset (&sig, 0x42, sizeof(sig));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->set_extension_config (plugin->cls,
"fnord",
"buzz",
&sig));
memset (&sig, 0, sizeof(sig));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->get_extension_config (plugin->cls,
"fnord",
&config,
&sig));
FAILIF (0 != strcmp ("buzz", config));
FAILIF (0x42 != sig.eddsa_signature.r[23]);
return GNUNET_OK;
drop:
return GNUNET_SYSERR;