Add test showing it is impossible to add CERT entry

with the current REST API, which it was proposed to be used in the
mixnet.
master
juga 2 years ago
parent f5212cf7fc
commit 73005028c8

@ -137,3 +137,24 @@ def test_list_gns_record_type():
assert 'pepfoundation.alice' == r['record_name']
# Even if there're several records, all should be type A
assert 'A' == r['data'][0]['record_type']
def test_add_cert_entry():
"""
Test that is not possible to add a record type ``CERT`` via REST.
Even if it is implement in GNS:
https://git.gnunet.org/gnunet.git/tree/src/gnsrecord/plugin_gnsrecord_dns.c#n130
"""
r = REST_CLIENT.add_namestore_entry(
"alice",
"pepfoundation",
"foo",
"CERT"
)
assert r[0] is False
# In gnunet logs it can be seen the line:
# ``gnunet-rest-server-12 ERROR Value invalid for record type```
# But the REST API only returns this.
assert "Internal Server Error" == r[1]

Loading…
Cancel
Save