Skip to content

Add tests for serialization for Ed25519 private and public key. - #1350

Merged
miguelaranda0 merged 4 commits into
google:masterfrom
juergw:other
Jul 2, 2025
Merged

Add tests for serialization for Ed25519 private and public key.#1350
miguelaranda0 merged 4 commits into
google:masterfrom
juergw:other

Conversation

@juergw

@juergw juergw commented Jun 26, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@juergw
juergw requested a review from tholenst July 1, 2025 08:58
}

@Test
public void deserializeInvalidPrivateKey_fails() throws Exception {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't know if it's worth to add tests where we just check that the Java library does the right thing; here this is clearly an invalid stream, so it would only worth to test this if we somehow completely parse it ourselves. I think in such a case I would rather add this test before I refactor the implementation. (Anyhow, of course let's leave the test for now and you can always disagree and add more tests).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

My plan is to add a check to the private key implementation that will change the behaviour in this test: instead of failing in "initSign", already "readObject" will fail. Adding this test now will make this much clearer in the next change, I think. So I'd prefer to keep it.

@juergw
juergw requested a review from miguelaranda0 July 2, 2025 10:34
@miguelaranda0
miguelaranda0 merged commit 0d59c62 into google:master Jul 2, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants