+ [task#133164,doing,0.5h] cne unit testing.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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');
|
||||
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');
|
||||
@@ -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');
|
||||
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');
|
||||
@@ -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');
|
||||
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');
|
||||
@@ -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');
|
||||
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');
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user