From cb2603f8bd378efa1684d34ae50e737a0e4675bb Mon Sep 17 00:00:00 2001 From: micafer Date: Wed, 15 Nov 2017 13:56:34 +0100 Subject: [PATCH 1/2] Add Build status --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 +``` From cc6380f997c6a1f69a1ff344d46bef8ef582e776 Mon Sep 17 00:00:00 2001 From: micafer Date: Wed, 15 Nov 2017 14:02:07 +0100 Subject: [PATCH 2/2] Fix test --- test/unit/test_radlinfo.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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()); } /**