pytest: Remove onion test vectors containing legacy onions.

I thought about fixing them up, but really these should be in
lnprototest anyway.  Turns out they're from the spec, so we should
actually fix them up there.

I moved the vector files into contrib/pyln-proto, since that still
needs them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-03-09 05:30:06 +10:30
parent 0db05f6e9c
commit 45143cc731
4 changed files with 2 additions and 12 deletions

View File

@ -64,7 +64,7 @@ def test_tu_fields():
dirname = os.path.dirname(__file__)
vector_base = os.path.join(dirname, '..', '..', '..', 'tests', 'vectors')
vector_base = os.path.join(dirname, '..', 'vectors')
have_vectors = os.path.exists(os.path.join(vector_base, 'onion-test-v0.json'))
@ -181,7 +181,7 @@ def sphinx_path_from_test_vector(filename: str) -> Tuple[onion.SphinxPath, dict]
"""Loads a sphinx test vector from the repo root.
"""
path = os.path.dirname(__file__)
root = os.path.join(path, '..', '..', '..')
root = os.path.join(path, '..')
filename = os.path.join(root, filename)
v = json.load(open(filename, 'r'))
session_key = onion.Secret(bytes.fromhex(v['generate']['session_key']))

View File

@ -83,13 +83,3 @@ def test_rendezvous_onion(directory, oniontool):
store_onion(out[-1][5:])
assert(out == ['payload=000000000000000000000000000000000400000004000000000000000000000000'])
def test_onion_vectors(oniontool):
tests = [
'onion-test-multi-frame.json',
'onion-test-v0.json']
for t in tests:
p = os.path.join(os.path.dirname(__file__), 'vectors', t)
print(subprocess.check_output([oniontool, 'runtest', p]).decode('ASCII'))