[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 9498a4b2e0aeebdba964aabaec9822b6912c663a

Roland Mas lolando at fusionforge.org
Mon Apr 28 12:44:31 CEST 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, Branch_5_3 has been updated
       via  9498a4b2e0aeebdba964aabaec9822b6912c663a (commit)
      from  3c975cb94e588b8b902603ffc994d123dae9882d (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 9498a4b2e0aeebdba964aabaec9822b6912c663a
Author: Roland Mas <lolando at debian.org>
Date:   Mon Apr 28 12:44:27 2014 +0200

    Added test for SSH

diff --git a/tests/func/Site/sshTest.php b/tests/func/Site/sshTest.php
new file mode 100644
index 0000000..bfe5aad
--- /dev/null
+++ b/tests/func/Site/sshTest.php
@@ -0,0 +1,57 @@
+<?php
+/*
+ * Copyright (C) 2014 Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *      
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */             
+
+require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
+
+class ScmGitSSHTest extends FForge_SeleniumTestCase
+{
+	function testSSH()
+	{
+		$this->init();
+
+		$this->uploadSshKey();
+	    
+		// Run the cronjobs
+		$this->reload_nscd();
+		$this->cron("homedirs.php");
+		$this->cron("ssh_create.php");
+
+		system("echo 'Trying SSH' 1>&2", $ret);
+		system("ssh -v ".FORGE_ADMIN_USERNAME."@".HOST." true", $ret);
+		$this->assertEquals($ret, 0);
+		system("echo 'End of SSH run' 1>&2", $ret);
+	}
+
+	/**
+	 * Method that is called after Selenium actions.
+	 *
+	 * @param  string $action
+	 */
+	protected function defaultAssertions($action)
+	{
+		if ($action == 'waitForPageToLoad') {
+			$this->assertTrue($this->isElementPresent("//h1")
+					  || $this->isElementPresent("//.[@class='page_footer']"));
+		}
+	}
+
+}
+?>

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

Summary of changes:
 tests/func/Site/sshTest.php |   57 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 tests/func/Site/sshTest.php


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list