[Fusionforge-commits] FusionForge branch master updated. 7ce87344b94412ce7284e3b99c57401d93e87499

Roland Mas lolando at fusionforge.org
Wed Dec 3 14:23:54 CET 2014


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  7ce87344b94412ce7284e3b99c57401d93e87499 (commit)
      from  7413218b042592d44310734583bad1d16728d432 (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 7ce87344b94412ce7284e3b99c57401d93e87499
Author: Roland Mas <lolando at debian.org>
Date:   Wed Dec 3 13:25:50 2014 +0100

    Testsuite: factor temporary setting of configuration values

diff --git a/tests/func/50_PluginsScmSvn/svnSSHTest.php b/tests/func/50_PluginsScmSvn/svnSSHTest.php
index 90a26be..8b0fb62 100644
--- a/tests/func/50_PluginsScmSvn/svnSSHTest.php
+++ b/tests/func/50_PluginsScmSvn/svnSSHTest.php
@@ -25,10 +25,7 @@ class ScmSvnSSHTest extends FForge_SeleniumTestCase
 {
 	function testScmSvnSSH()
 	{
-		$forge_get_config = RUN_JOB_PATH."/forge_get_config";
-		$config_path = rtrim(`$forge_get_config config_path`);
-		file_put_contents("$config_path/config.ini.d/zzz-buildbot-svnsshtest",
-				  "[scmsvn]\n"."use_ssh = yes\n"."use_dav = no\n");
+        $this->changeConfig("[scmsvn]\nuse_ssh = yes\nuse_dav = no\n");
 
 		$this->activatePlugin('scmsvn');
 		$this->populateStandardTemplate('empty');
diff --git a/tests/func/50_PluginsScmSvn/svnWUITest.php b/tests/func/50_PluginsScmSvn/svnWUITest.php
index 44a9f46..6228029 100644
--- a/tests/func/50_PluginsScmSvn/svnWUITest.php
+++ b/tests/func/50_PluginsScmSvn/svnWUITest.php
@@ -25,10 +25,7 @@ class ScmSvnWUITest extends FForge_SeleniumTestCase
 {
 	function testScmSvnWUI()
 	{
-		$forge_get_config = RUN_JOB_PATH."/forge_get_config";
-		$config_path = rtrim(`$forge_get_config config_path`);
-		file_put_contents("$config_path/config.ini.d/zzz-buildbot-svnwuitest",
-				  "[scmsvn]\n"."use_ssh = no\n"."use_dav = yes\n");
+        $this->changeConfig("[scmsvn]\nuse_ssh = no\nuse_dav = yes\n");
 
 		$this->activatePlugin('scmsvn');
 		$this->populateStandardTemplate('empty');
diff --git a/tests/func/60_PluginsMediawiki/mediawikiTest.php b/tests/func/60_PluginsMediawiki/mediawikiTest.php
index 4a4e589..6d3dbd6 100644
--- a/tests/func/60_PluginsMediawiki/mediawikiTest.php
+++ b/tests/func/60_PluginsMediawiki/mediawikiTest.php
@@ -30,10 +30,7 @@ class PluginMediawiki extends FForge_SeleniumTestCase
 		$this->skip_on_rpm_installs();
 		$this->skip_on_centos();
 
-		$forge_get_config = RUN_JOB_PATH."/forge_get_config";
-		$config_path = rtrim(`$forge_get_config config_path`);
-		file_put_contents("$config_path/config.ini.d/zzz-buildbot-mediawikitest",
-				  "[mediawiki]\n"."unbreak_frames=yes\n");
+        $this->changeConfig("[mediawiki]\nunbreak_frames=yes\n");
 
 		$this->activatePlugin('mediawiki');
 		
diff --git a/tests/func/60_PluginsMoinMoin/moinmoinTest.php b/tests/func/60_PluginsMoinMoin/moinmoinTest.php
index eb4c303..98f401a 100644
--- a/tests/func/60_PluginsMoinMoin/moinmoinTest.php
+++ b/tests/func/60_PluginsMoinMoin/moinmoinTest.php
@@ -30,10 +30,7 @@ class PluginMoinMoin extends FForge_SeleniumTestCase
 		$this->skip_on_rpm_installs();
 		$this->skip_on_centos();
 
-		$forge_get_config = RUN_JOB_PATH."/forge_get_config";
-		$config_path = rtrim(`$forge_get_config config_path`);
-		file_put_contents("$config_path/config.ini.d/zzz-buildbot-mediawikitest",
-				  "[moinmoin]\n"."use_frame=no\n");
+        $this->changeConfig("[moinmoin]\nuse_frame=no\n");
 
 		$this->activatePlugin('moinmoin');
 		
diff --git a/tests/func/Testing/SeleniumForge.php b/tests/func/Testing/SeleniumForge.php
index 7099d4a..1786085 100644
--- a/tests/func/Testing/SeleniumForge.php
+++ b/tests/func/Testing/SeleniumForge.php
@@ -77,6 +77,14 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 		$this->screenshotBgColor = '#CCFFDD';
 	}
 
+    protected function changeConfig($text) {
+            $forge_get_config = RUN_JOB_PATH."/forge_get_config";
+            $config_path = rtrim(`$forge_get_config config_path`);
+            $classname = get_class($this);
+            file_put_contents("$config_path/config.ini.d/zzz-buildbot-$classname.ini",
+                              $text);
+    }
+
 	/**
 	 * Method that is called after Selenium actions.
 	 *

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

Summary of changes:
 tests/func/50_PluginsScmSvn/svnSSHTest.php       |    5 +----
 tests/func/50_PluginsScmSvn/svnWUITest.php       |    5 +----
 tests/func/60_PluginsMediawiki/mediawikiTest.php |    5 +----
 tests/func/60_PluginsMoinMoin/moinmoinTest.php   |    5 +----
 tests/func/Testing/SeleniumForge.php             |    8 ++++++++
 5 files changed, 12 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list