3 * Copyright (C) 2014 Roland Mas
5 * This file is part of FusionForge.
7 * FusionForge is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation; either version 2 of the License,
10 * or (at your option) any later version.
12 * FusionForge is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
24 class SSHTest extends FForge_SeleniumTestCase
28 $this->skip_on_rpm_installs();
29 $this->skip_on_src_installs();
33 $this->uploadSshKey();
37 $this->cron("homedirs.php");
38 $this->cron("ssh_create.php");
43 system("echo 'Trying SSH' 1>&2", $ret);
46 system("ssh $v ".FORGE_ADMIN_USERNAME."@".HOST." true", $ret);
47 $this->assertEquals($ret, 0);
49 system("echo 'End of SSH run' 1>&2", $ret);
54 * Method that is called after Selenium actions.
56 * @param string $action
58 protected function defaultAssertions($action)
60 if ($action == 'waitForPageToLoad') {
61 $this->assertTrue($this->isElementPresent("//h1")
62 || $this->isElementPresent("//.[@class='page_footer']"));