mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
deluge: Functional tests for bit-torrent group
Add tests to check that usage of Deluge is only permitted to users in the group 'bit-torrent'. Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
c975fb94e3
commit
8085879643
@ -13,6 +13,18 @@ Scenario: Enable deluge application
|
||||
When I enable the deluge application
|
||||
Then the deluge site should be available
|
||||
|
||||
Scenario: User of 'bit-torrent' group
|
||||
Given the deluge application is enabled
|
||||
When I create a user named delugeuser with password deluge&456 in group bit-torrent
|
||||
And I'm logged in as the user delugeuser with password deluge&456
|
||||
Then the deluge site should be available
|
||||
|
||||
Scenario: User not of 'bit-torrent' group
|
||||
Given the deluge application is enabled
|
||||
When I create a user named nogroupuser with password somep@ssw6
|
||||
And I'm logged in as the user nogroupuser with password somep@ssw6
|
||||
Then the deluge site should not be available
|
||||
|
||||
Scenario: Upload a torrent to deluge
|
||||
Given the deluge application is enabled
|
||||
When all torrents are removed from deluge
|
||||
|
||||
@ -170,7 +170,7 @@ def create_user(session_browser, name, password):
|
||||
|
||||
@when(
|
||||
parsers.parse('I create a user named {name:w} with password {password:S} '
|
||||
'in group {group:w}'))
|
||||
'in group {group:S}'))
|
||||
def create_user_in_group(session_browser, name, password, group):
|
||||
if not functional.user_exists(session_browser, name):
|
||||
functional.create_user(session_browser, name, password, groups=[group])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user