* Run ztf update for instance.
This commit is contained in:
@@ -10,8 +10,7 @@ title=instanceModel->countOldDomain();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 查看获取到的所有服务的数量 @1
|
||||
- 查看获取到的所有服务的数量 @1
|
||||
- 查看获取到的所有服务的数量 @5
|
||||
|
||||
*/
|
||||
|
||||
@@ -19,4 +18,4 @@ global $tester;
|
||||
$tester->loadModel('instance');
|
||||
|
||||
$oldDomain = $tester->instance->countOldDomain();
|
||||
r($oldDomain) && p('') && e('5'); // 查看获取到的所有服务的数量
|
||||
r($oldDomain) && p('') && e('5'); // 查看获取到的所有服务的数量
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
su('admin');
|
||||
|
||||
zdTable('instance')->gen(1);
|
||||
|
||||
/**
|
||||
|
||||
title=instanceModel->createInstance();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 传入name,则使用name
|
||||
- 属性id @2
|
||||
- 属性name @测试创建实例
|
||||
- 属性desc @描述1
|
||||
- 不传入name,则使用alias
|
||||
- 属性id @3
|
||||
- 属性name @zentao_1
|
||||
- 属性desc @描述1
|
||||
- 修改domain
|
||||
- 属性id @4
|
||||
- 属性domain @r1z1.dops.corp.cc
|
||||
|
||||
*/
|
||||
|
||||
global $tester;
|
||||
$tester->loadModel('instance');
|
||||
|
||||
$app = new stdclass();
|
||||
$app->id = 'zentao';
|
||||
$app->alias = 'zentao_1';
|
||||
$app->name = 'zentao';
|
||||
$app->logo = '/var/www/logo/zentao.png';
|
||||
$app->desc = '描述1';
|
||||
$app->introduction = '介绍1';
|
||||
$app->chart = '';
|
||||
$app->app_version = '11.0';
|
||||
$app->version = '11.0';
|
||||
|
||||
$space = new stdclass();
|
||||
$space->id = 1;
|
||||
|
||||
$instance = $tester->instance->createInstance($app, $space, 'test', '测试创建实例');
|
||||
r($instance) && p('id,name,desc') && e('2,测试创建实例,描述1'); // 传入name,则使用name
|
||||
|
||||
$instance = $tester->instance->createInstance($app, $space, 'test');
|
||||
r($instance) && p('id,name,desc') && e('3,zentao_1,描述1'); // 不传入name,则使用alias
|
||||
|
||||
$instance = $tester->instance->createInstance($app, $space, 'r1z1');
|
||||
r($instance) && p('id,domain') && e('4,r1z1.dops.corp.cc'); // 修改domain
|
||||
@@ -3,33 +3,16 @@
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
zdTable('instance')->gen(1);
|
||||
|
||||
/**
|
||||
|
||||
title=instanceModel->printCpuUsage();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 查看获取到的第一条instance
|
||||
- 属性id @1
|
||||
- 属性name @Subversion
|
||||
- 属性chart @subversion
|
||||
- 查看获取到的第一条instance的space
|
||||
- 属性id @1
|
||||
- 属性name @默认空间1
|
||||
- 查看获取到的第一条instance的solution
|
||||
- 属性id @1
|
||||
- 属性name @解决方案1
|
||||
- 查看获取到的第二条instance
|
||||
- 属性id @2
|
||||
- 属性name @禅道开源版
|
||||
- 属性chart @zentao
|
||||
- 查看获取到的第二条instance的space
|
||||
- 属性id @2
|
||||
- 属性name @默认空间2
|
||||
- 查看获取到的第二条instance的solution
|
||||
- 属性id @2
|
||||
- 属性name @解决方案2
|
||||
- 查看不存在的instance @0
|
||||
- 查看获取到的数量 @5
|
||||
- 查看获取到的颜色属性color @secondary
|
||||
- 查看获取到的提示属性tip @10% = 10 / 100
|
||||
|
||||
*/
|
||||
|
||||
@@ -46,4 +29,4 @@ $result = instanceModel::printCpuUsage($instance, $metrics);
|
||||
|
||||
r(count($result)) && p() && e('5'); // 查看获取到的数量
|
||||
r($result) && p('color') && e('secondary'); // 查看获取到的颜色
|
||||
r($result) && p('tip') && e('10% = 10 / 100'); // 查看获取到的提示
|
||||
r($result) && p('tip') && e('10% = 10 / 100'); // 查看获取到的提示
|
||||
@@ -12,7 +12,7 @@ cid=1
|
||||
|
||||
- 查看获取到的数量 @5
|
||||
- 查看获取到的颜色属性color @secondary
|
||||
- 查看获取到的提示属性tip @10% = 10 / 100
|
||||
- 查看获取到的提示属性tip @10% = 10B / 100B
|
||||
|
||||
*/
|
||||
|
||||
@@ -29,4 +29,4 @@ $result = instanceModel::printMemUsage($instance, $metrics);
|
||||
|
||||
r(count($result)) && p() && e('5'); // 查看获取到的数量
|
||||
r($result) && p('color') && e('secondary'); // 查看获取到的颜色
|
||||
r($result) && p('tip') && e('10% = 10 / 100'); // 查看获取到的提示
|
||||
r($result) && p('tip') && e('10% = 10B / 100B'); // 查看获取到的提示
|
||||
Reference in New Issue
Block a user