Implemented tests for encrypted folders - #17697
daniele-verducci wants to merge 14 commits into
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
…able Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
04133f4 to
ae74111
Compare
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
| if (!storePrivateKeyResult.isSuccess) { | ||
| val deletePublicKeyOperation = DeletePublicKeyRemoteOperation() | ||
| deletePublicKeyOperation.executeNextcloudClient(user, context) | ||
| return@withContext "" |
There was a problem hiding this comment.
We can use sealed class instead of empty String.
sealed class PrivateKeyResult {
data class Success(val key: String): PrivateKeyResult()
data object Failed: PrivateKeyResult()
}
val privateKeyResult = EncryptionKeyGenerator(context, user ?: return).generatePrivateKey(keyWords)
when(privateKeyResult) {
is EncryptionKeyGenerator.PrivateKeyResult.Success -> {
keyResult = KEY_GENERATE
if (dialog == null) {
Log_OC.e(TAG, "Dialog is null cannot proceed further.")
return
}
requireDialog().dismiss()
notifyResult()
}
EncryptionKeyGenerator.PrivateKeyResult.Failed -> {
keyResult = KEY_FAILED
errorSavingKeys()
}
}
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
|
test-Unit test failed, but no output was generated. Maybe a preliminary stage failed. |
|
stable35-IT test failed, but no output was generated. Maybe a preliminary stage failed. |
|
master-IT test failed, but no output was generated. Maybe a preliminary stage failed. |
|
stable22-IT test failed, but no output was generated. Maybe a preliminary stage failed. |
Tests for encrypted (sub)folders.
Related: #17608
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)