-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Expand file tree
/
Copy pathencryption.feature
More file actions
42 lines (41 loc) · 2.09 KB
/
Copy pathencryption.feature
File metadata and controls
42 lines (41 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
Feature: encryption
Scenario: encryption tests
# Setup encryption
Given using new dav path
And user "user0" exists
And User "user0" uploads file with content "BLABLABLA" to "/non-encrypted.txt"
And invoking occ with "app:enable encryption"
And the command was successful
And invoking occ with "encryption:enable"
And the command was successful
And As an "user0"
And User "user0" uploads file with content "BLABLABLA" to "/encrypted.txt"
# Check both encrypted and non-encrypted files can be read
When Downloading file "/encrypted.txt" with range "bytes=0-8"
Then Downloaded content should be "BLABLABLA"
When Downloading file "/non-encrypted.txt" with range "bytes=0-8"
Then Downloaded content should be "BLABLABLA"
When invoking occ with "info:file user0/files/encrypted.txt"
And the command was successful
Then the command output contains the text "server-side encrypted: yes"
When invoking occ with "info:file user0/files/non-encrypted.txt"
And the command was successful
Then the command output does not contain the text "server-side encrypted: yes"
# Run encryption:encrypt-all and checks that non-encrypted file gets encrypted
When invoking occ with "encryption:encrypt-all" with input "y"
And the command was successful
And invoking occ with "info:file user0/files/non-encrypted.txt"
And the command was successful
Then the command output contains the text "server-side encrypted: yes"
And Downloading file "/non-encrypted.txt" with range "bytes=0-8"
And Downloaded content should be "BLABLABLA"
# Run encryption:decrypt-all and checks that files gets decrypted
When invoking occ with "encryption:decrypt-all" with input "y"
And the command was successful
And invoking occ with "info:file user0/files/non-encrypted.txt"
And the command was successful
Then the command output does not contain the text "server-side encrypted: yes"
And Downloading file "/non-encrypted.txt" with range "bytes=0-8"
And Downloaded content should be "BLABLABLA"