From 0707ceaf2c70210aad8e12efcfe84d38006deb1e Mon Sep 17 00:00:00 2001 From: zhangxiquan Date: Tue, 26 Nov 2024 10:47:49 +0000 Subject: [PATCH] + [task#133164,doing,0.5h] cne unit testing. --- module/cne/test/model/getcomponents.php | 9 ++++++++- module/cne/test/model/getevents.php | 9 ++++++++- module/cne/test/model/getpods.php | 9 ++++++++- module/cne/test/model/uninstallapp.php | 9 ++++++++- module/cne/test/model/upgrade.php | 8 ++++++++ 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/module/cne/test/model/getcomponents.php b/module/cne/test/model/getcomponents.php index 289aa75735..180cefa96f 100644 --- a/module/cne/test/model/getcomponents.php +++ b/module/cne/test/model/getcomponents.php @@ -8,7 +8,10 @@ timeout=0 cid=1 - 获取CNE平台的组件 status @normal - +- 获取CNE平台的组件 status @normal +- 获取CNE平台的组件 status @normal +- 获取CNE平台的组件 status @normal +- 获取CNE平台的组件 status @normal */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -16,4 +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 diff --git a/module/cne/test/model/getevents.php b/module/cne/test/model/getevents.php index 42e723a484..c69cb2af28 100644 --- a/module/cne/test/model/getevents.php +++ b/module/cne/test/model/getevents.php @@ -8,7 +8,10 @@ timeout=0 cid=1 - 获取CNE平台的事件 status @normal - +- 获取CNE平台的事件 status @normal +- 获取CNE平台的事件 status @normal +- 获取CNE平台的事件 status @normal +- 获取CNE平台的事件 status @normal */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -16,4 +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 diff --git a/module/cne/test/model/getpods.php b/module/cne/test/model/getpods.php index 2d9d2a991f..e3d9e30530 100644 --- a/module/cne/test/model/getpods.php +++ b/module/cne/test/model/getpods.php @@ -8,7 +8,10 @@ timeout=0 cid=1 - 获取CNE平台的pod status @normal - +- 获取CNE平台的pod status @normal +- 获取CNE平台的pod status @normal +- 获取CNE平台的pod status @normal +- 获取CNE平台的pod status @normal */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -16,4 +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 diff --git a/module/cne/test/model/uninstallapp.php b/module/cne/test/model/uninstallapp.php index afced49c08..7d6ae2af33 100644 --- a/module/cne/test/model/uninstallapp.php +++ b/module/cne/test/model/uninstallapp.php @@ -8,7 +8,10 @@ timeout=0 cid=1 - 卸载CNE平台的卸载应用 status @normal - +- 卸载CNE平台的卸载应用 status @normal +- 卸载CNE平台的卸载应用 status @normal +- 卸载CNE平台的卸载应用 status @normal +- 卸载CNE平台的卸载应用 status @normal */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -30,3 +33,7 @@ $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 diff --git a/module/cne/test/model/upgrade.php b/module/cne/test/model/upgrade.php index a3a83daaae..4dcae11973 100644 --- a/module/cne/test/model/upgrade.php +++ b/module/cne/test/model/upgrade.php @@ -7,6 +7,10 @@ title=测试 cneModel->upgrade(); timeout=0 cid=1 +- 升级禅道DevOps平台版 status @normal +- 升级禅道DevOps平台版 status @normal +- 升级禅道DevOps平台版 status @normal +- 升级禅道DevOps平台版 status @normal - 升级禅道DevOps平台版 status @normal */ @@ -21,3 +25,7 @@ $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');