[Fusionforge-commits] FusionForge branch master updated. 22fb6e5d449cfc1fba7765235d0031e6af0dc554

Roland Mas lolando at fusionforge.org
Fri Jan 16 18:41:59 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  22fb6e5d449cfc1fba7765235d0031e6af0dc554 (commit)
      from  1b67cf0da9500a162b809336f63499ccb8fb6818 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 22fb6e5d449cfc1fba7765235d0031e6af0dc554
Author: Roland Mas <lolando at debian.org>
Date:   Fri Jan 16 18:33:11 2015 +0100

    Test that the reactivity system updates the repository permissions when needed

diff --git a/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php b/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php
index 908e047..a3d903f 100644
--- a/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php
+++ b/tests/func/50_PluginsScmGit/gitSmartHTTPTest.php
@@ -25,7 +25,6 @@ class ScmGitSmartHTTPTest extends FForge_SeleniumTestCase
 {
 	function testScmGitSmartHTTP()
 	{
-
 		$this->changeConfig("[core]\nuse_ssl = no\n");
 
 		$this->activatePlugin('scmgit');
@@ -39,8 +38,8 @@ class ScmGitSmartHTTPTest extends FForge_SeleniumTestCase
 		$this->clickAndWait("link=Source Code Admin");
 		$this->click("//input[@name='scmengine[]' and @value='scmgit']");
 		$this->clickAndWait("submit");
-
-		// Run the cronjob to create repositories
+	    
+		// Create repositories
 		$this->waitSystasks();
 
 		// Get the address of the repo
@@ -84,6 +83,35 @@ class ScmGitSmartHTTPTest extends FForge_SeleniumTestCase
 		$this->assertTextPresent("Modifying file");
 		$this->assertTextPresent("Adding file");
 
+        // Check gitweb directly
+		$this->open('/plugins/scmgit/cgi-bin/gitweb.cgi?p=projecta/projecta.git');
+		$this->assertElementPresent("//.[@class='page_footer']");
+		$this->assertTextPresent("projecta.git");
+		$this->clickAndWait("link=projecta.git");
+		$this->assertTextPresent("Modifying file");
+		$this->assertTextPresent("Adding file");
+
+        // Disable anonymous access to gitweb
+		$this->open(ROOT);
+		$this->clickAndWait("link=ProjectA");
+		$this->click("link=Admin");
+		$this->waitForPageToLoad("30000");
+		$this->assertTrue($this->isTextPresent("Project Information"));
+		$this->click("link=Users and permissions");
+		$this->waitForPageToLoad("30000");
+		$this->assertTrue($this->isTextPresent("Current Project Members"));
+		$this->click("//tr/td/form/div[contains(.,'Anonymous')]/../../../td/form/div/input[contains(@value,'Unlink Role')]");
+		$this->waitForPageToLoad("30000");
+		$this->assertTrue($this->isTextPresent("Role unlinked successfully"));
+
+		// Update repositories
+		$this->waitSystasks();
+
+        // Check that gitweb now fails
+		$this->open('/plugins/scmgit/cgi-bin/gitweb.cgi?p=projecta/projecta.git');
+		$this->assertElementPresent("//.[@class='page_footer']");
+		$this->assertTextNotPresent("projecta.git");
+
 		system("rm -fr $t");
 	}
 

-----------------------------------------------------------------------

Summary of changes:
 tests/func/50_PluginsScmGit/gitSmartHTTPTest.php |   34 ++++++++++++++++++++--
 1 file changed, 31 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list