[icinga-checkins] icinga.org: icinga-web/master: * Updated tests

git at icinga.org git at icinga.org
Tue Sep 28 15:16:22 CEST 2010


Module: icinga-web
Branch: master
Commit: 5c8037055515c697bb38f26a371bf619383fe5cc
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=5c8037055515c697bb38f26a371bf619383fe5cc

Author: root <root at localhost.localdomain>
Date:   Tue Sep 28 14:02:51 2010 +0200

* Updated tests

---

 etc/tests/test.properties.in                    |    8 ++++----
 etc/tests/tests/installation/userRightsTest.php |    5 +++--
 etc/tests/tests/interface/availabilityTest.php  |    8 ++++----
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/etc/tests/test.properties.in b/etc/tests/test.properties.in
index c5aaeda..1392daa 100644
--- a/etc/tests/test.properties.in
+++ b/etc/tests/test.properties.in
@@ -1,6 +1,6 @@
-#
-# Properties for the test suite
-#
+'
+' Properties for the test suite
+'
 
 www-user =  @web_user@
 www-group = @web_group@
@@ -8,4 +8,4 @@ www-port = 80
 www-port-ssl = 443
 web-path = @web_path@
 testLogin-name = root
-testLogin-pass = password
\ No newline at end of file
+testLogin-pass = password
diff --git a/etc/tests/tests/installation/userRightsTest.php b/etc/tests/tests/installation/userRightsTest.php
index 2f4b641..ff5de6b 100644
--- a/etc/tests/tests/installation/userRightsTest.php
+++ b/etc/tests/tests/installation/userRightsTest.php
@@ -41,7 +41,7 @@ class userRightsTest extends AgaviPhpUnitTestCase {
 	public function testCacheDirsAreWriteable() {
 		info("\tTesting if web user can write to cache\n");
 		$root = AgaviConfig::get("core.root_dir");
-		$cacheFolders = array($root."app/cache");
+		$cacheFolders = array($root."/app/cache");
 
 		$wwwUser = $this->sharedFixture['www-user'];
 		$wwwGroup = $this->sharedFixture['www-group'];
@@ -50,6 +50,7 @@ class userRightsTest extends AgaviPhpUnitTestCase {
 		if(!$wwwUser)
 			$this->markTestSkipped("No www-user specified in test.properties!");
 		foreach($cacheFolders as $folder) {
+			 
 			exec("su ".$wwwUser." -c 'touch ".$folder."/testfile.txt'");
 			if(!file_exists($folder."/testfile.txt")) {
 				error("Web user ".$wwwUser." couldn't write to cache ".$folder.
@@ -103,4 +104,4 @@ class userRightsTest extends AgaviPhpUnitTestCase {
 		}
 	}	
 	
-}
\ No newline at end of file
+}
diff --git a/etc/tests/tests/interface/availabilityTest.php b/etc/tests/tests/interface/availabilityTest.php
index 70bf803..c1d7995 100644
--- a/etc/tests/tests/interface/availabilityTest.php
+++ b/etc/tests/tests/interface/availabilityTest.php
@@ -10,7 +10,7 @@ class availabilityTest extends AgaviPhpUnitTestCase {
 			
 	public function testShowLoginMask() {
 		$ctx = AgaviContext::getInstance('web');
-		$container = $ctx->getController()->createExecutionContainer("AppKit","AjaxLogin",null,"html");
+		$container = $ctx->getController()->createExecutionContainer("AppKit","Login.AjaxLogin",null,"html");
 		try {
 			$result = $container->execute();
 			if($result->getHttpStatusCode() != '200' && $result->getHttpStatusCode() != '401' )
@@ -33,7 +33,7 @@ class availabilityTest extends AgaviPhpUnitTestCase {
 		));
 		$json = null;
 		$ctx = AgaviContext::getInstance('web');
-		$container = $ctx->getController()->createExecutionContainer("AppKit","AjaxLogin",$params,"json","write");
+		$container = $ctx->getController()->createExecutionContainer("AppKit","Login.AjaxLogin",$params,"json","write");
 		try {
 			$result = $container->execute();
 			$json = json_decode($result->getContent(),true);
@@ -64,7 +64,7 @@ class availabilityTest extends AgaviPhpUnitTestCase {
 		));
 		
 		$ctx = AgaviContext::getInstance('web');
-		$container = $ctx->getController()->createExecutionContainer("AppKit","AjaxLogin",$params,"json","write");
+		$container = $ctx->getController()->createExecutionContainer("AppKit","Login.AjaxLogin",$params,"json","write");
 		$json = null;
 		try {
 			$result = $container->execute();
@@ -80,4 +80,4 @@ class availabilityTest extends AgaviPhpUnitTestCase {
 		success("\tLogin successful\n");
 	}	
 
-}
\ No newline at end of file
+}





More information about the icinga-checkins mailing list