Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

df/add-stream-test-vectors #555

Merged
merged 4 commits into from
Oct 23, 2019
Merged

Conversation

sappenin
Copy link
Contributor

@sappenin sappenin commented Oct 9, 2019

Introduces a JSON file that allows STREAM implementations to validate their ASN.1 OER encoding/decoding of alll Frames defined in IL-RFC-29.

Signed-off-by: sappenin sappenin@gmail.com

Introduces a JSON file that allows STREAM implementations to validate their ASN.1 OER encoding/decoding of alll Frames defined in IL-RFC-29.

Signed-off-by: sappenin <sappenin@gmail.com>
Copy link
Member

@emschwartz emschwartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this should test whole packets (with encryption) as well as the inner frames

@sappenin
Copy link
Contributor Author

It seems like this should test whole packets (with encryption) as well as the inner frames

Good call - I'll update that today and tag you when it's ready.

@sharafian sharafian requested review from sentientwaffle and removed request for sharafian October 17, 2019 17:57
@sentientwaffle
Copy link
Contributor

@sappenin
Copy link
Contributor Author

sappenin commented Oct 17, 2019

@sappenin consider using part or all of https://github.com/interledgerjs/ilp-protocol-stream/blob/master/test/fixtures/packets.json

@sentientwaffle Wow, that test harness is much better than the one I created.

I see there's a generator, so is it correct to say that we can just take the packets.json and use that as a fixed fixture, or is there some important reason to re-generate fixtures on every test run?

@sentientwaffle
Copy link
Contributor

sentientwaffle commented Oct 17, 2019

@sappenin Thanks! The generator is just for convenience -- to make it easier to add additional test cases. Adding the packets.json file is sufficient, there's no need to run (or even include) the generator script.

@sappenin
Copy link
Contributor Author

sappenin commented Oct 18, 2019

@sentientwaffle Sounds good - one question about the frame:connection_new_address:empty test-case in here. Is that something that should be tolerated? This is the only thing that the Java code barfs on, but I'm thinking that a ConnectionNewAddress frame with no address should be a protocol violation, no?

sentientwaffle added a commit to interledgerjs/ilp-protocol-stream that referenced this pull request Oct 18, 2019
Remove `frame:connection_new_address:empty` test (per interledger/rfcs#555 (comment)).
@sentientwaffle
Copy link
Contributor

You're correct, an empty address should be invalid. Not sure what I was thinking when I added that test case.

Signed-off-by: sappenin <sappenin@gmail.com>
@sappenin
Copy link
Contributor Author

@sentientwaffle I just pushed new changes to this PR that mirror your test vectors. Want to give this another look?

Copy link
Contributor

@sentientwaffle sentientwaffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor changes, but overall LGTM.

0029-stream/test-vectors/README.md Outdated Show resolved Hide resolved
0029-stream/test-vectors/README.md Outdated Show resolved Hide resolved
0029-stream/test-vectors/README.md Outdated Show resolved Hide resolved
0029-stream/test-vectors/README.md Outdated Show resolved Hide resolved
0029-stream/test-vectors/README.md Outdated Show resolved Hide resolved
Signed-off-by: sappenin <sappenin@gmail.com>
Copy link
Contributor

@sentientwaffle sentientwaffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm not sure why circleci believes so many files changed (causing it to fail).

@sappenin sappenin merged commit a52db05 into master Oct 23, 2019
@sappenin sappenin deleted the df/add-stream-frame-test-vectors branch October 23, 2019 20:34
justmoon pushed a commit to interledgerjs/interledgerjs that referenced this pull request May 1, 2022
Remove `frame:connection_new_address:empty` test (per interledger/rfcs#555 (comment)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants