diff --git a/module/cne/test/lib/cne.unittest.class.php b/module/cne/test/lib/cne.unittest.class.php index d58ad5a5e6..dd821ece1b 100755 --- a/module/cne/test/lib/cne.unittest.class.php +++ b/module/cne/test/lib/cne.unittest.class.php @@ -170,6 +170,7 @@ class cneTest { $this->objectModel->error = new stdClass(); $instance = $this->objectModel->loadModel('instance')->getByID(2); + if(is_null($instance)) return null; $result = $this->objectModel->getComponents($instance); if(!empty($this->objectModel->error->message)) return $this->objectModel->error; @@ -187,6 +188,7 @@ class cneTest { $this->objectModel->error = new stdClass(); $instance = $this->objectModel->loadModel('instance')->getByID(2); + if(is_null($instance)) return null; $result = $this->objectModel->getPods($instance); if(!empty($this->objectModel->error->message)) return $this->objectModel->error; @@ -204,6 +206,7 @@ class cneTest { $this->objectModel->error = new stdClass(); $instance = $this->objectModel->loadModel('instance')->getByID(2); + if(is_null($instance)) return null; $result = $this->objectModel->getEvents($instance); if(!empty($this->objectModel->error->message)) return $this->objectModel->error; @@ -222,6 +225,7 @@ class cneTest $this->objectModel->error = new stdClass(); $instance = $this->objectModel->loadModel('instance')->getByID(3); if(is_null($instance)) return null; + $result = $this->objectModel->getAppLogs($instance); if(!empty($this->objectModel->error->message)) return $this->objectModel->error; diff --git a/module/cne/test/model/getcomponents.php b/module/cne/test/model/getcomponents.php index 180cefa96f..90befa3581 100644 --- a/module/cne/test/model/getcomponents.php +++ b/module/cne/test/model/getcomponents.php @@ -7,11 +7,11 @@ title=测试 cneModel->getComponents(); timeout=0 cid=1 -- 获取CNE平台的组件 status @normal -- 获取CNE平台的组件 status @normal -- 获取CNE平台的组件 status @normal -- 获取CNE平台的组件 status @normal -- 获取CNE平台的组件 status @normal +- 获取CNE平台的组件 status @0 +- 获取CNE平台的组件 status @0 +- 获取CNE平台的组件 status @0 +- 获取CNE平台的组件 status @0 +- 获取CNE平台的组件 status @0 */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -19,8 +19,8 @@ include dirname(__FILE__, 2) . '/lib/cne.unittest.class.php'; $cneModel = new cneTest(); -r($cneModel->getComponentsTest()) && p('status') && e('normal'); -r($cneModel->getComponentsTest()) && p('status') && e('normal'); -r($cneModel->getComponentsTest()) && p('status') && e('normal'); -r($cneModel->getComponentsTest()) && p('status') && e('normal'); -r($cneModel->getComponentsTest()) && p('status') && e('normal'); \ No newline at end of file +r($cneModel->getComponentsTest()) && p('status') && e('0'); +r($cneModel->getComponentsTest()) && p('status') && e('0'); +r($cneModel->getComponentsTest()) && p('status') && e('0'); +r($cneModel->getComponentsTest()) && p('status') && e('0'); +r($cneModel->getComponentsTest()) && p('status') && e('0'); \ No newline at end of file diff --git a/module/cne/test/model/getevents.php b/module/cne/test/model/getevents.php index c69cb2af28..c95c2a7930 100644 --- a/module/cne/test/model/getevents.php +++ b/module/cne/test/model/getevents.php @@ -7,11 +7,11 @@ title=测试 cneModel->getEvents(); timeout=0 cid=1 -- 获取CNE平台的事件 status @normal -- 获取CNE平台的事件 status @normal -- 获取CNE平台的事件 status @normal -- 获取CNE平台的事件 status @normal -- 获取CNE平台的事件 status @normal +- 获取CNE平台的事件 status @0 +- 获取CNE平台的事件 status @0 +- 获取CNE平台的事件 status @0 +- 获取CNE平台的事件 status @0 +- 获取CNE平台的事件 status @0 */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -19,8 +19,8 @@ include dirname(__FILE__, 2) . '/lib/cne.unittest.class.php'; $cneModel = new cneTest(); -r($cneModel->getEventsTest()) && p('status') && e('normal'); -r($cneModel->getEventsTest()) && p('status') && e('normal'); -r($cneModel->getEventsTest()) && p('status') && e('normal'); -r($cneModel->getEventsTest()) && p('status') && e('normal'); -r($cneModel->getEventsTest()) && p('status') && e('normal'); \ No newline at end of file +r($cneModel->getEventsTest()) && p('status') && e('0'); +r($cneModel->getEventsTest()) && p('status') && e('0'); +r($cneModel->getEventsTest()) && p('status') && e('0'); +r($cneModel->getEventsTest()) && p('status') && e('0'); +r($cneModel->getEventsTest()) && p('status') && e('0'); \ No newline at end of file diff --git a/module/cne/test/model/getpods.php b/module/cne/test/model/getpods.php index e3d9e30530..373f4d6667 100644 --- a/module/cne/test/model/getpods.php +++ b/module/cne/test/model/getpods.php @@ -7,11 +7,11 @@ title=测试 cneModel->getPods(); timeout=0 cid=1 -- 获取CNE平台的pod status @normal -- 获取CNE平台的pod status @normal -- 获取CNE平台的pod status @normal -- 获取CNE平台的pod status @normal -- 获取CNE平台的pod status @normal +- 获取CNE平台的pod status @0 +- 获取CNE平台的pod status @0 +- 获取CNE平台的pod status @0 +- 获取CNE平台的pod status @0 +- 获取CNE平台的pod status @0 */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -19,8 +19,8 @@ include dirname(__FILE__, 2) . '/lib/cne.unittest.class.php'; $cneModel = new cneTest(); -r($cneModel->getPodsTest()) && p('status') && e('normal'); -r($cneModel->getPodsTest()) && p('status') && e('normal'); -r($cneModel->getPodsTest()) && p('status') && e('normal'); -r($cneModel->getPodsTest()) && p('status') && e('normal'); -r($cneModel->getPodsTest()) && p('status') && e('normal'); \ No newline at end of file +r($cneModel->getPodsTest()) && p('status') && e('0'); +r($cneModel->getPodsTest()) && p('status') && e('0'); +r($cneModel->getPodsTest()) && p('status') && e('0'); +r($cneModel->getPodsTest()) && p('status') && e('0'); +r($cneModel->getPodsTest()) && p('status') && e('0'); \ No newline at end of file diff --git a/module/cne/test/model/uninstallapp.php b/module/cne/test/model/uninstallapp.php index 7d6ae2af33..ee491918f8 100644 --- a/module/cne/test/model/uninstallapp.php +++ b/module/cne/test/model/uninstallapp.php @@ -7,11 +7,11 @@ title=测试 cneModel->uninstallApp(); timeout=0 cid=1 -- 卸载CNE平台的卸载应用 status @normal -- 卸载CNE平台的卸载应用 status @normal -- 卸载CNE平台的卸载应用 status @normal -- 卸载CNE平台的卸载应用 status @normal -- 卸载CNE平台的卸载应用 status @normal +- 卸载CNE平台的卸载应用 status @0 +- 卸载CNE平台的卸载应用 status @0 +- 卸载CNE平台的卸载应用 status @0 +- 卸载CNE平台的卸载应用 status @0 +- 卸载CNE平台的卸载应用 status @0 */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -21,6 +21,8 @@ $config->CNE->api->host = 'http://g79n.corp.cc:32380'; $config->CNE->api->token = 'hYFfFOTUR5CIBoonLFx1UjnmQ7NtBxo9'; $config->CNE->app->domain = 'g79n.corp.cc'; +$cneModel = $tester->loadModel('cne'); + $instance = $this->objectModel->loadModel('instance')->getByID(2); $apiParams = new stdclass(); @@ -30,10 +32,8 @@ $apiParams->chart = $instance->chart; $apiParams->namespace = $instance->spaceData->k8space; $apiParams->channel = $instance->channel; -$cneModel = $tester->loadModel('cne'); - -r($cneModel->uninstallApp($apiParams)) && p('status') && e('normal'); -r($cneModel->uninstallApp($apiParams)) && p('status') && e('normal'); -r($cneModel->uninstallApp($apiParams)) && p('status') && e('normal'); -r($cneModel->uninstallApp($apiParams)) && p('status') && e('normal'); -r($cneModel->uninstallApp($apiParams)) && p('status') && e('normal'); \ No newline at end of file +r($cneModel->uninstallApp($apiParams)) && p('status') && e('0'); +r($cneModel->uninstallApp($apiParams)) && p('status') && e('0'); +r($cneModel->uninstallApp($apiParams)) && p('status') && e('0'); +r($cneModel->uninstallApp($apiParams)) && p('status') && e('0'); +r($cneModel->uninstallApp($apiParams)) && p('status') && e('0'); \ No newline at end of file diff --git a/module/cne/test/model/upgrade.php b/module/cne/test/model/upgrade.php index 4dcae11973..3ae865a4c5 100644 --- a/module/cne/test/model/upgrade.php +++ b/module/cne/test/model/upgrade.php @@ -7,11 +7,11 @@ title=测试 cneModel->upgrade(); timeout=0 cid=1 -- 升级禅道DevOps平台版 status @normal -- 升级禅道DevOps平台版 status @normal -- 升级禅道DevOps平台版 status @normal -- 升级禅道DevOps平台版 status @normal -- 升级禅道DevOps平台版 status @normal +- 升级禅道DevOps平台版 status @0 +- 升级禅道DevOps平台版 status @0 +- 升级禅道DevOps平台版 status @0 +- 升级禅道DevOps平台版 status @0 +- 升级禅道DevOps平台版 status @0 */ @@ -24,8 +24,8 @@ $config->CNE->app->domain = 'g79n.corp.cc'; $cneModel = $tester->loadModel('cne'); -r($cneModel->upgrade()) && p('status') && e('normal'); -r($cneModel->upgrade()) && p('status') && e('normal'); -r($cneModel->upgrade()) && p('status') && e('normal'); -r($cneModel->upgrade()) && p('status') && e('normal'); -r($cneModel->upgrade()) && p('status') && e('normal'); +r($cneModel->upgrade()) && p('status') && e('0'); +r($cneModel->upgrade()) && p('status') && e('0'); +r($cneModel->upgrade()) && p('status') && e('0'); +r($cneModel->upgrade()) && p('status') && e('0'); +r($cneModel->upgrade()) && p('status') && e('0');