-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathcli.feature
More file actions
84 lines (75 loc) · 3.59 KB
/
cli.feature
File metadata and controls
84 lines (75 loc) · 3.59 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Feature: CLI updater
Scenario: No update is available - 20.0.0
Given the current version is 20.0.0
When the CLI updater is run
Then the output should contain "Could not find config.php. Is this file in the "updater" subfolder of Nextcloud?"
Scenario: No update is available - 20.0.0
Given the current installed version is 20.0.0
And there is no update available
When the CLI updater is run successfully
Then the installed version should be 20.0.0
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available - 20.0.0 to 20.0.1
Given the current installed version is 20.0.0
And there is an update to version 20.0.1 available
When the CLI updater is run successfully
Then the installed version should be 20.0.1
And maintenance mode should be off
And upgrade is not required
Scenario: Invalid update is available - 20.0.0 to 20.0.503
Given the current installed version is 20.0.0
And there is an update to version 20.0.503 available
When the CLI updater is run
Then the return code should not be 0
And the output should contain "Download failed - Not Found (HTTP 404)"
And the installed version should be 20.0.0
And maintenance mode should be off
And upgrade is not required
Scenario: Update without valid signature is being offered - 19.0.0 to 19.0.3
Given the current installed version is 19.0.0
# This works because 19.0.3 is in the signature list with an invalid signature
And there is an update to version 19.0.3 available
When the CLI updater is run
Then the return code should not be 0
And the output should contain "Signature of update is not valid"
And the installed version should be 19.0.0
And maintenance mode should be off
And upgrade is not required
Scenario: Update to older version - 20.0.0 to 19.0.2
Given the current installed version is 20.0.0
And there is an update to version 19.0.2 available
When the CLI updater is run
Then the return code should not be 0
And the output should contain "Downloaded version is lower than installed version"
And the installed version should be 20.0.0
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available but autoupdate is disabled - 20.0.0 to 20.0.1
Given the current installed version is 20.0.0
And the autoupdater is disabled
And there is an update to version 20.0.1 available
When the CLI updater is run
Then the installed version should be 20.0.0
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available and apps2 folder is there and configured - 20.0.0 to 20.0.1
Given the current installed version is 20.0.0
And there is an update to version 20.0.1 available
And there is a folder called "apps2"
And there is a config for a secondary apps directory called "apps2"
When the CLI updater is run successfully
Then the installed version should be 20.0.1
And maintenance mode should be off
And upgrade is not required
Scenario: Update is available and apps2 folder is there and not configured - 20.0.0 to 20.0.1
Given the current installed version is 20.0.0
And there is an update to version 20.0.1 available
And there is a folder called "apps2"
When the CLI updater is run
Then the return code should not be 0
And the output should contain "The following extra files have been found"
And the output should contain "apps2"
And the installed version should be 20.0.0
And maintenance mode should be off
And upgrade is not required