[evolvis-commits] r15518: Tests: deprecate define BASE => ROOT and misc fixes
mirabilos at evolvis.org
mirabilos at evolvis.org
Tue Mar 1 00:12:26 CET 2011
Author: mirabilos
Date: 2011-03-01 00:12:25 +0100 (Tue, 01 Mar 2011)
New Revision: 15518
Modified:
trunk/gforge_base/evolvisforge-5.1/tests/func/News/newsTest.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Site/loginTest.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Site/projectsTest.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Site/top.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Site/troveTest.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumGforge.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/relationTest.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/trackersTest.php
trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/workflowTest.php
trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.buildbot
trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.sample
trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.tests
trunk/gforge_base/evolvisforge-5.1/tests/func/db_reload.php
Log:
Tests: deprecate define BASE => ROOT and misc fixes
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/News/newsTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/News/newsTest.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/News/newsTest.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -94,7 +94,7 @@
// Check modification of a news.
$this->click("link=News");
$this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '" . BASE . "/news/admin/?group_id=6')]");
+ $this->click("//a[contains(@href, '" . ROOT . "/news/admin/?group_id=6')]");
$this->waitForPageToLoad("30000");
$this->click("link=Second news");
$this->waitForPageToLoad("30000");
@@ -123,7 +123,7 @@
$this->assertTrue($this->isTextPresent("Special ' chars \""));
$this->click("link=News");
$this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '". BASE . "/news/admin/?group_id=6')]");
+ $this->click("//a[contains(@href, '". ROOT . "/news/admin/?group_id=6')]");
$this->waitForPageToLoad("30000");
$this->click("link=Test3");
$this->waitForPageToLoad("30000");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Site/loginTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Site/loginTest.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Site/loginTest.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -53,7 +53,7 @@
function testLogin()
{
// Test with a normal login.
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=Log In");
$this->waitForPageToLoad("30000");
$this->type("form_loginname", "admin");
@@ -65,7 +65,7 @@
$this->logout();
// Test with an empty password.
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=Log In");
$this->waitForPageToLoad("30000");
$this->type("form_loginname", "admin");
@@ -77,7 +77,7 @@
$this->assertTrue($this->isTextPresent("Log In"));
// Test with a wrong password.
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=Log In");
$this->waitForPageToLoad("30000");
$this->type("form_loginname", "admin");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Site/projectsTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Site/projectsTest.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Site/projectsTest.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -52,7 +52,7 @@
// After creation, project is visible on the main page.
function testSimpleCreate()
{
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=Log In");
$this->waitForPageToLoad("30000");
$this->type("form_loginname", "admin");
@@ -89,7 +89,7 @@
function testCharsCreateTestCase()
{
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=Log In");
$this->waitForPageToLoad("30000");
$this->type("form_loginname", "admin");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Site/top.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Site/top.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Site/top.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -49,7 +49,7 @@
{
function testWalkInTop()
{
- $this->open( BASE );
+ $this->open( ROOT );
// Test that from the main page we access the most active this week.
$this->click("link=[ More ]");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Site/troveTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Site/troveTest.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Site/troveTest.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -26,7 +26,7 @@
{
function testTroveAdmin()
{
- $this->open( BASE );
+ $this->open( ROOT );
$this->login('admin');
$this->click("link=Site Admin");
$this->waitForPageToLoad("30000");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/RPMSeleniumRemoteSuite.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -13,9 +13,10 @@
system("scp -rp ~/fusionforge_repo root@".HOST.":");
system("scp -rp ".dirname(__FILE__)."/../../../src/rpm-specific/dag-rpmforge.repo root@".HOST.":/etc/yum.repos.d/");
+
// system("scp -rp ".dirname(__FILE__)."/../../../src/rpm-specific/fusionforge-ci.repo root@".HOST.":/etc/yum.repos.d/");
if (getenv('FFORGE_RPM_REPO')) {
- system("ssh root@".HOST." 'cd /etc/yum.repos.d/; wget FFORGE_RPM_REPO/fusionforge.repo");
+ system("ssh root@".HOST." 'cd /etc/yum.repos.d/; wget ".getenv('FFORGE_RPM_REPO')."/fusionforge.repo'");
}
# Prefill yum cache to reduce real downloads.
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumGforge.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumGforge.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Testing/SeleniumGforge.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -43,7 +43,9 @@
* ALONE BASIS."
*/
-require_once 'func/config.php';
+$config = getenv('CONFIG_PHP') ? getenv('CONFIG_PHP'): 'func/config.php';
+require_once $config;
+
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
@@ -76,7 +78,7 @@
protected function init() {
$this->createProject('ProjectA');
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=ProjectA");
$this->waitForPageToLoad("30000");
}
@@ -101,7 +103,7 @@
protected function logout()
{
// $this->click("link=Log Out");
- $this->open( BASE ."/account/logout.php" );
+ $this->open( ROOT ."/account/logout.php" );
$this->waitForPageToLoad("30000");
}
@@ -115,7 +117,7 @@
$unix_name = strtolower($name);
// Create a simple project.
- $this->open( BASE );
+ $this->open( ROOT );
$this->waitForPageToLoad("30000");
$this->assertTrue($this->isTextPresent('Log In'));
$this->click("link=Log In");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/relationTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/relationTest.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/relationTest.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -52,14 +52,14 @@
$this->createProject('ProjectA');
// Testing extra-fields
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=ProjectA");
$this->waitForPageToLoad("30000");
$this->click("link=Tracker");
$this->waitForPageToLoad("30000");
$this->click("link=Bugs");
$this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
+ $this->click("//a[contains(@href, '".ROOT. "/tracker/admin/?group_id=6&atid=101')]");
$this->waitForPageToLoad("30000");
$this->click("link=Manage Custom Fields");
$this->waitForPageToLoad("30000");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/trackersTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/trackersTest.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/trackersTest.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -52,7 +52,7 @@
$this->createProject('ProjectA');
// Test: Create a simple bug report (Message1/Text1).
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=ProjectA");
$this->waitForPageToLoad("30000");
$this->click("link=Tracker");
@@ -126,14 +126,14 @@
$this->createProject('ProjectA');
// Testing extra-fields
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=ProjectA");
$this->waitForPageToLoad("30000");
$this->click("link=Tracker");
$this->waitForPageToLoad("30000");
$this->click("link=Bugs");
$this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
+ $this->click("//a[contains(@href, '".ROOT. "/tracker/admin/?group_id=6&atid=101')]");
$this->waitForPageToLoad("30000");
$this->click("link=Manage Custom Fields");
$this->waitForPageToLoad("30000");
@@ -142,7 +142,7 @@
$this->click("field_type");
$this->click("post_changes");
$this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
+ $this->click("//a[contains(@href, '".ROOT. "/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
$this->waitForPageToLoad("30000");
$this->type("name", "1");
$this->click("post_changes");
@@ -160,7 +160,7 @@
$this->assertTrue($this->isTextPresent("Element inserted"));
// Testing [#3649]: 0 not accepted when modifying a select list value
- $this->open(BASE."/tracker/admin/index.php?group_id=6&atid=101&add_extrafield=1");
+ $this->open(ROOT."/tracker/admin/index.php?group_id=6&atid=101&add_extrafield=1");
$this->click("//tr[@id='field-number']/td[3]/a[5]");
$this->waitForPageToLoad("30000");
$this->type("name", "10");
@@ -179,7 +179,7 @@
$this->createProject('ProjectA');
// Create a new tracker and delete it after.
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=ProjectA");
$this->waitForPageToLoad("30000");
$this->click("link=Tracker");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/workflowTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/workflowTest.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/Trackers/workflowTest.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -52,14 +52,14 @@
$this->createProject('ProjectA');
// Testing extra-fields
- $this->open( BASE );
+ $this->open( ROOT );
$this->click("link=ProjectA");
$this->waitForPageToLoad("30000");
$this->click("link=Tracker");
$this->waitForPageToLoad("30000");
$this->click("link=Bugs");
$this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
+ $this->click("//a[contains(@href, '".ROOT. "/tracker/admin/?group_id=6&atid=101')]");
$this->waitForPageToLoad("30000");
$this->click("link=Manage Custom Fields");
$this->waitForPageToLoad("30000");
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.buildbot
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.buildbot 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.buildbot 2011-02-28 23:12:25 UTC (rev 15518)
@@ -12,21 +12,20 @@
// Host where selenium-rc is running
define ('SELENIUM_RC_HOST', getenv('SELENIUM_RC_HOST'));
-define ('SELENIUM_RC_DIR', getenv('SELENIUM_RC_DIR');
+define ('SELENIUM_RC_DIR', getenv('SELENIUM_RC_DIR'));
// The forge's hostname
define ('HOST', getenv('HOST'));
// Base URL where FusionForge is installed
define ('ROOT', '');
-define ('BASE', '');
// Database connection parameters.
define('DB_TYPE', 'pgsql'); // Values: mysql, pgsql
define('DB_NAME', 'fforge');
define('DB_USER', 'gforge');
define('DB_PASSWORD', '@@FFDB_PASS@@');
-define('DB_INIT_CMD', 'php '.dirname(__FILE__).'/db_reload.php');
+define('DB_INIT_CMD', "ssh root@".HOST." 'cd /usr/share/tests/func; CONFIGURED=true CONFIG_PHP=config.php.buildbot php db_reload.php'");
// this should be an existing user of the forge together with its password
// (the password should be different from 'xxxxxx')
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.sample
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.sample 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.sample 2011-02-28 23:12:25 UTC (rev 15518)
@@ -19,7 +19,6 @@
// Base URL where FusionForge is installed
define ('ROOT', '');
-define ('BASE', '');
// Database connection parameters.
define('DB_TYPE', 'pgsql'); // Values: mysql, pgsql
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.tests
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.tests 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/config.php.tests 2011-02-28 23:12:25 UTC (rev 15518)
@@ -17,7 +17,7 @@
define ('URL', 'http://centos52.local/');
// Base URL where FusionForge is installed
-define ('BASE', '');
+define ('ROOT', '');
// Database connection parameters.
define('DB_TYPE', 'pgsql'); // Values: mysql, pgsql
Modified: trunk/gforge_base/evolvisforge-5.1/tests/func/db_reload.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/func/db_reload.php 2011-02-28 23:12:23 UTC (rev 15517)
+++ trunk/gforge_base/evolvisforge-5.1/tests/func/db_reload.php 2011-02-28 23:12:25 UTC (rev 15518)
@@ -100,10 +100,10 @@
// Temporary.
$sys_default_theme_id = 5;
-set_include_path(".:/opt/gforge/:/opt/gforge/www/include/:/etc/gforge/");
+//set_include_path(".:/opt/gforge/:/opt/gforge/www/include/:/etc/gforge/");
require_once '../../gforge/www/env.inc.php';
-require_once $gfwww.'include/squal_pre.php';
+require_once $gfwww.'include/pre.php';
// Add alcatel theme to the database.
db_query_params ('INSERT INTO themes (theme_id, dirname, fullname, enabled) VALUES (5, $1, $2, true)',
More information about the evolvis-commits
mailing list