$this->clickAndWait("submit");
// Run the svn create to get the repository with the hooks.
- $this->cron("cronjobs/create_scm_repos.php");
+ $this->cron("create_scm_repos.php");
$svn = "svn";
$url = URL."svn/projecta/";
require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
-class Top extends FForge_SeleniumTestCase
+class TopTester extends FForge_SeleniumTestCase
{
- function skiptestWalkInTop()
+ function testWalkInTop()
{
+ $this->cron("project_weekly_metric.php");
+
$this->populateStandardTemplate('forums');
- $this->init();
+ $this->init();
$this->clickAndWait("link=Forums");
$this->clickAndWait("link=open-discussion");
$this->assertTextPresent("Message Posted Successfully");
sleep(1);
- $this->cron("cronjobs/project_weekly_metric.php");
+ $this->cron("project_weekly_metric.php");
// Test that from the main page we access the most active this week.
$this->clickAndWait("link=Home");
$this->clickAndWait("link=[View Other Top Categories]");
$this->clickAndWait("link=Top Downloads");
$this->assertTextPresent("Rank");
+
+
+ $this->cron("project_weekly_metric.php");
}
}
protected function cron($cmd)
{
- system("/usr/bin/php -q /usr/share/gforge/$cmd");
+ $this->runCommand(RUN_JOB_PATH."forge_run_job $cmd");
+ }
+
+ protected function cron_for_plugin($cmd, $plugin)
+ {
+ $this->runCommand(RUN_JOB_PATH."forge_run_plugin_job $plugin $cmd");
}
protected function init() {
$this->init($project, $user);
// Run manually the cron for creating the svn structure.
- $this->cron("cronjobs/create_scm_repos.php");
+ $this->cron("create_scm_repos.php");
}
protected function login($username)
define('DB_PASSWORD', '@@FFDB_PASS@@');
define('DB_INIT_CMD', "$FORGE_HOME/tests/func/db_reload.sh >>/var/log/db_reload_selenium.log 2>&1");
+// Cronjob wrapper script location
+if (is_executable ("$FORGE_HOME/bin/forge_run_job")) {
+ define('RUN_JOB_PATH', "$FORGE_HOME/bin/");
+} elseif (is_executable ("$FORGE_HOME/src/utils/forge_run_job")) {
+ define('RUN_JOB_PATH', "$FORGE_HOME/src/utils/");
+}
+
// this should be an existing user of the forge together with its password
// (the password should be different from 'myadmin')
define ('FORGE_ADMIN_USERNAME', '$FORGE_ADMIN_USERNAME');