-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35435 from owncloud/stable10-form-from
[stable10] cli test for security certificates
- Loading branch information
Showing
3 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,7 +334,6 @@ public function findLines($input, $text) { | |
$results[] = $line; | ||
} | ||
} | ||
|
||
return $results; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
tests/acceptance/features/cliMain/securityCertificates.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@cli | ||
Feature: security certificates | ||
As an admin | ||
I want to be able to manage the ownCloud security certificates | ||
So that I can ensure the proper encrpytion mechanism | ||
|
||
Scenario: Import a security certificate | ||
When the administrator imports security certificate from the path "tests/data/certificates/goodCertificate.crt" | ||
Then the command should have been successful | ||
When the administrator invokes occ command "security:certificates" | ||
Then the command should have been successful | ||
And the command output table should contain the following text: | ||
| table_column | | ||
| goodCertificate.crt | | ||
|
||
Scenario: List security certificates when multiple certificates are imported | ||
Given the administrator has imported security certificate from the path "tests/data/certificates/goodCertificate.crt" | ||
And the administrator has imported security certificate from the path "tests/data/certificates/badCertificate.crt" | ||
When the administrator invokes occ command "security:certificates" | ||
And the command output table should contain the following text: | ||
| table_column | | ||
| goodCertificate.crt | | ||
| badCertificate.crt | | ||
|
||
Scenario: Remove a security certificate | ||
Given the administrator has imported security certificate from the path "tests/data/certificates/goodCertificate.crt" | ||
And the administrator has imported security certificate from the path "tests/data/certificates/badCertificate.crt" | ||
When the administrator removes the security certificate "goodCertificate.crt" | ||
Then the command should have been successful | ||
When the administrator invokes occ command "security:certificates" | ||
And the command output table should contain the following text: | ||
| table_column | | ||
| badCertificate.crt | | ||
|
||
@issue-35364 | ||
Scenario: Remove a security certificate that is not installed | ||
When the administrator removes the security certificate "someCertificate.crt" | ||
Then the command should have been successful | ||
# Then the command should not have been successful | ||
|
||
Scenario: Import random file as certificate | ||
When the administrator imports security certificate from the path "tests/data/lorem.txt" | ||
Then the command error output should contain the text "Certificate could not get parsed." |