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

Add unit test on ScanEncryptorUtils. #8900

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Sep 10, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Add test to check that content can be decrypted. When we will switch to Vodozemac, the test will be updated, to ensure that content encrypted by libolm will be decryptable by Vodozemac.

Motivation and context

Part of libolm removal.

CC @poljar @Velin92

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

Copy link
Member

@BillCarsonFr BillCarsonFr left a comment

Choose a reason for hiding this comment

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

Just a nit

private val aPrivateKey = "CLYwNaeA9d0KHE0DniO1bxGgmNsPJ/pyanF4b4tcK1M="

@Test
fun whenNoServerKeyIsProvidedTheContentIsNotEncrypted() {
Copy link
Member

Choose a reason for hiding this comment

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

and what happens when one is provided :D ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, at the beginning, the test was named whenServerKeyIsProvidedTheContentIsEncrypted, but then I renamed it. I will add another test to cover this.

@bmarty bmarty merged commit 6a8e978 into develop Sep 11, 2024
11 of 12 checks passed
@bmarty bmarty deleted the feature/bma/testScanEncryptorUtils branch September 11, 2024 09:13
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.

2 participants