[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Validate signed descriptors when testing
commit 0f35be160fe11e082ee9482a774136aa72fd3477
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Fri Jun 30 09:35:23 2017 -0700
Validate signed descriptors when testing
Well, this is dumb. We sign the descriptors but didn't run validation checks.
Oh well, trivial to fix.
---
test/unit/descriptor/extrainfo_descriptor.py | 2 +-
test/unit/descriptor/server_descriptor.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unit/descriptor/extrainfo_descriptor.py b/test/unit/descriptor/extrainfo_descriptor.py
index 1f91e72..822f6d1 100644
--- a/test/unit/descriptor/extrainfo_descriptor.py
+++ b/test/unit/descriptor/extrainfo_descriptor.py
@@ -136,7 +136,7 @@ k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
@test.require.cryptography
def test_descriptor_signing(self):
- RelayExtraInfoDescriptor.create(sign = True)
+ RelayExtraInfoDescriptor.create(sign = True, validate = True)
self.assertRaisesRegexp(NotImplementedError, 'Signing of BridgeExtraInfoDescriptor not implemented', BridgeExtraInfoDescriptor.create, sign = True)
def test_multiple_metrics_bridge_descriptors(self):
diff --git a/test/unit/descriptor/server_descriptor.py b/test/unit/descriptor/server_descriptor.py
index 8578726..b015474 100644
--- a/test/unit/descriptor/server_descriptor.py
+++ b/test/unit/descriptor/server_descriptor.py
@@ -257,7 +257,7 @@ Qlx9HNCqCY877ztFRC624ja2ql6A2hBcuoYMbkHjcQ4=
@test.require.cryptography
def test_descriptor_signing(self):
- RelayDescriptor.create(sign = True)
+ RelayDescriptor.create(sign = True, validate = True)
self.assertRaisesRegexp(NotImplementedError, 'Signing of BridgeDescriptor not implemented', BridgeDescriptor.create, sign = True)
@patch('time.time', Mock(return_value = time.mktime(datetime.date(2010, 1, 1).timetuple())))
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits