From 504d0cdf00a57fcd10c62ec681ef9feb5b1b4c0b Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Sun, 10 Jan 2021 09:31:02 +0200 Subject: [PATCH] gitweb: Add functional tests for git-access group Add functional tests: - User of git-access group can access gitweb site. - User not of git-access group can't access gitweb site. Tested that all the gitweb app tests pass. Signed-off-by: Veiko Aasa Reviewed-by: Joseph Nuthalapati --- plinth/modules/gitweb/tests/gitweb.feature | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plinth/modules/gitweb/tests/gitweb.feature b/plinth/modules/gitweb/tests/gitweb.feature index 37a98aa5a..15685d5d4 100644 --- a/plinth/modules/gitweb/tests/gitweb.feature +++ b/plinth/modules/gitweb/tests/gitweb.feature @@ -70,7 +70,6 @@ Scenario: Edit default branch of the repository When I set branch1 as a default branch Then the gitweb site should show branch1 as a default repo branch - Scenario: Access public repository with git client Given the gitweb application is enabled And a public repository @@ -88,6 +87,20 @@ Scenario: Access private repository with git client And the repository should be privately readable And the repository should be privately writable +Scenario: User of git-access group can access gitweb site + Given the gitweb application is enabled + And all repositories are private + And the user gituser in group git-access exists + When I'm logged in as the user gituser + Then the gitweb site should be available + +Scenario: User not of git-access group can't access gitweb site + Given the gitweb application is enabled + And all repositories are private + And the user nogroupuser exists + When I'm logged in as the user nogroupuser + Then the gitweb site should not be available + Scenario: Delete repository Given the gitweb application is enabled And a repository