diff --git a/README.md b/README.md index ef4d20b..e04b85f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ IM - Infrastructure Manager web GUI =================================== +* Build Status [![Build Status](http://jenkins.i3m.upv.es/buildStatus/icon?job=grycap/im-web-unit)](http://jenkins.i3m.upv.es:8080/job/grycap/job/im-web-unit/) + IM is a tool that ease the access and the usability of IaaS clouds by automating the VMI selection, deployment, configuration, software installation, monitoring and update of Virtual Appliances. It supports APIs from a large number of @@ -94,4 +96,4 @@ It also supports environment variables to set the IM service location: ```sh docker run -p 80:80 -e "im_use_rest=true" -e "im_host=server.domain" -e "im_port=8800" -d grycap/im-web -``` \ No newline at end of file +``` diff --git a/test/unit/test_radlinfo.php b/test/unit/test_radlinfo.php index d11533b..ef97e6c 100644 --- a/test/unit/test_radlinfo.php +++ b/test/unit/test_radlinfo.php @@ -84,8 +84,17 @@ public function testLaunch() $_SESSION = array("user"=>"admin", "password"=>"admin"); $_GET = array("op"=>"launch", "id"=>$rowid, "parameters"=>"1", "wn"=>"2"); + + $im = $this->getMockBuilder(IMRest::class) + ->setMethods(['CreateInfrastructure']) + ->getMock(); + $im->method('CreateInfrastructure') + ->willReturn("infid"); + + $GLOBALS['mock_im'] = $im; include('../../radlinfo.php'); - $this->assertEquals(array('Location: error.php?msg=Error%3A+Connect+error%3A+Connection+refused+%28111%29'),xdebug_get_headers()); + unset($GLOBALS['mock_im']); + $this->assertEquals(array('Location: list.php'),xdebug_get_headers()); } /**