-
Notifications
You must be signed in to change notification settings - Fork 0
TESTcase-simplekvm #3481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.5.12
Are you sure you want to change the base?
TESTcase-simplekvm #3481
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,51 @@ | ||||||||||||||
| package org.zstack.test.integration.kvm.vm | ||||||||||||||
|
|
||||||||||||||
| import org.zstack.header.vm.VmInstanceState | ||||||||||||||
| import org.zstack.header.vm.VmInstanceVO | ||||||||||||||
| import org.zstack.sdk.VmInstanceInventory | ||||||||||||||
| import org.zstack.test.integration.kvm.Env | ||||||||||||||
| import org.zstack.test.integration.kvm.KvmTest | ||||||||||||||
| import org.zstack.testlib.EnvSpec | ||||||||||||||
| import org.zstack.testlib.SubCase | ||||||||||||||
|
|
||||||||||||||
| /** | ||||||||||||||
| * 最小化虚拟机测试用例 | ||||||||||||||
| * 仅验证虚拟机创建后的状态 | ||||||||||||||
| */ | ||||||||||||||
| class SimpleVmLifeCycleCase extends SubCase { | ||||||||||||||
|
|
||||||||||||||
| EnvSpec env | ||||||||||||||
|
|
||||||||||||||
| @Override | ||||||||||||||
| void setup() { | ||||||||||||||
| useSpring(KvmTest.springSpec) | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| @Override | ||||||||||||||
| void environment() { | ||||||||||||||
| env = Env.oneVmTwoHostNfsEnv() | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| @Override | ||||||||||||||
| void test() { | ||||||||||||||
| env.create { | ||||||||||||||
| testVmIsRunningAfterCreation() | ||||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| /** | ||||||||||||||
| * 测试:创建后虚拟机应处于 Running 状态 | ||||||||||||||
| */ | ||||||||||||||
|
Comment on lines
+36
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 方法注释中包含中文,违反编码规范。 根据编码规范,代码中不应包含中文(包括注释)。请将中文注释改为英文。 📝 建议修改 /**
- * 测试:创建后虚拟机应处于 Running 状态
+ * Test: VM should be in Running state after creation
*/
void testVmIsRunningAfterCreation() {📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| void testVmIsRunningAfterCreation() { | ||||||||||||||
| VmInstanceInventory vm = env.inventoryByName("vm") as VmInstanceInventory | ||||||||||||||
|
|
||||||||||||||
| VmInstanceVO vo = dbFindByUuid(vm.uuid, VmInstanceVO.class) | ||||||||||||||
| assert vo != null | ||||||||||||||
| assert vo.state == VmInstanceState.Running | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| @Override | ||||||||||||||
| void clean() { | ||||||||||||||
| env.delete() | ||||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,88 +1,88 @@ | ||
| #DbFacadeDataSource.jdbcUrl=jdbc:mysql://192.168.0.214:3306/zstack | ||
| DB.url=jdbc:mysql://localhost:3306/ | ||
| DB.user=root | ||
| DB.password= | ||
| DB.idleConnectionTestPeriod=500 | ||
| DB.maxIdleTime=600 | ||
| DbFacadeDataSource.maxPoolSize=64 | ||
| RESTFacade.hostname=localhost | ||
| RESTFacade.port=8989 | ||
| RESTFacade.path= | ||
| KVMHostFactory.agentPort=8989 | ||
| Ceph.backupStorageAgent.port=8989 | ||
| Ceph.primaryStorageAgent.port=8989 | ||
| Zbs.primaryStorageAgent.port=8989 | ||
| SftpBackupStorageFactory.deployPuppetModule=false | ||
| SftpBackupStorage.agentPort=8989 | ||
| CdpBackupStorage.agentPort=8989 | ||
| ImageStoreBackupStorage.agentPort=8989 | ||
| Zabbix.port=8989 | ||
| NfsPrimaryStorageKVMBackend.syncGetCapacity=true | ||
| VirtualRouterManager.agentPort=8989 | ||
| VirtualRouterManager.cleanVirtualRouterVmWhenFail=true | ||
| ManagementServerConsoleProxyBackend.agentPort=8989 | ||
| IscsiFileSystemBackendPrimaryStorage.agentPort=8989 | ||
| BaremetalPxeServer.agentPort=8989 | ||
| httpConsoleProxyPort = 8989 | ||
| AppBuildSystem.agentPort=8989 | ||
| Zdfs.agentPort=8989 | ||
| ApiMediator.apiWorkerNum=50 | ||
| unitTestOn=true | ||
| elaboration.slowThresholdMs=200 | ||
| exitJVMOnStop=false | ||
| #CloudBus.closeTracker=true | ||
| #CloudBus.messageTTL=1 | ||
| #CloudBus.closeTracker=true | ||
| #vmTracerOn=false | ||
| #Simulator.notCacheAgentCommand=true | ||
| ErrorFacade.dumpOnError=false | ||
| #ThreadFacade.maxThreadNum=2100 | ||
| Ansible.cfg.forks=100 | ||
| Ansible.cfg.host_key_checking=False | ||
| Ansible.cfg.pipelining=True | ||
| CloudBus.serverIp.0 = localhost | ||
| org.jboss.logging.provider=slf4j | ||
| exposeSimulatorType=true | ||
| Cassandra.contactPoints=127.0.0.1 | ||
| Cassandra.port=9042 | ||
| Cassandra.keyspace=zstack_billing | ||
| Cassandra.bin=~/apache-cassandra-2.2.3/bin/cassandra | ||
| Cassandra.cqlsh=~/apache-cassandra-2.2.3/bin/cqlsh | ||
| PrimaryStorage.capacityTrackerOn=true | ||
| shadowEntityOn=true | ||
| isThreadContextMapInheritable=true | ||
| enableElaboration=true | ||
| Prometheus.versionMode=2.x | ||
| InfluxDB.metadata.version=v2 | ||
| chain.task.qos=true | ||
| identity.init.type= | ||
| #DbFacadeDataSource.jdbcUrl=jdbc:mysql://192.168.0.214:3306/zstack | ||
| DB.url=jdbc:mysql://localhost:3306/ | ||
| DB.user=root | ||
| DB.password= | ||
| DB.idleConnectionTestPeriod=500 | ||
| DB.maxIdleTime=600 | ||
|
|
||
| DbFacadeDataSource.maxPoolSize=64 | ||
|
|
||
| RESTFacade.hostname=localhost | ||
| RESTFacade.port=8989 | ||
| RESTFacade.path= | ||
|
|
||
| KVMHostFactory.agentPort=8989 | ||
|
|
||
| Ceph.backupStorageAgent.port=8989 | ||
| Ceph.primaryStorageAgent.port=8989 | ||
|
|
||
| Zbs.primaryStorageAgent.port=8989 | ||
|
|
||
| SftpBackupStorageFactory.deployPuppetModule=false | ||
| SftpBackupStorage.agentPort=8989 | ||
|
|
||
| CdpBackupStorage.agentPort=8989 | ||
| ImageStoreBackupStorage.agentPort=8989 | ||
| Zabbix.port=8989 | ||
|
|
||
| NfsPrimaryStorageKVMBackend.syncGetCapacity=true | ||
|
|
||
| VirtualRouterManager.agentPort=8989 | ||
| VirtualRouterManager.cleanVirtualRouterVmWhenFail=true | ||
|
|
||
| ManagementServerConsoleProxyBackend.agentPort=8989 | ||
|
|
||
| IscsiFileSystemBackendPrimaryStorage.agentPort=8989 | ||
|
|
||
| BaremetalPxeServer.agentPort=8989 | ||
|
|
||
| httpConsoleProxyPort = 8989 | ||
|
|
||
| AppBuildSystem.agentPort=8989 | ||
|
|
||
| Zdfs.agentPort=8989 | ||
|
|
||
| ApiMediator.apiWorkerNum=50 | ||
|
|
||
| unitTestOn=true | ||
| elaboration.slowThresholdMs=200 | ||
| exitJVMOnStop=false | ||
|
|
||
| #CloudBus.closeTracker=true | ||
| #CloudBus.messageTTL=1 | ||
| #CloudBus.closeTracker=true | ||
|
|
||
| #vmTracerOn=false | ||
| #Simulator.notCacheAgentCommand=true | ||
|
|
||
| ErrorFacade.dumpOnError=false | ||
|
|
||
| #ThreadFacade.maxThreadNum=2100 | ||
|
|
||
| Ansible.cfg.forks=100 | ||
| Ansible.cfg.host_key_checking=False | ||
| Ansible.cfg.pipelining=True | ||
|
|
||
| CloudBus.serverIp.0 = localhost | ||
|
|
||
| org.jboss.logging.provider=slf4j | ||
|
|
||
| exposeSimulatorType=true | ||
|
|
||
| Cassandra.contactPoints=127.0.0.1 | ||
| Cassandra.port=9042 | ||
| Cassandra.keyspace=zstack_billing | ||
| Cassandra.bin=~/apache-cassandra-2.2.3/bin/cassandra | ||
| Cassandra.cqlsh=~/apache-cassandra-2.2.3/bin/cqlsh | ||
|
|
||
| PrimaryStorage.capacityTrackerOn=true | ||
| shadowEntityOn=true | ||
| isThreadContextMapInheritable=true | ||
| enableElaboration=true | ||
| Prometheus.versionMode=2.x | ||
| InfluxDB.metadata.version=v2 | ||
|
|
||
| chain.task.qos=true | ||
|
|
||
| identity.init.type= | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释中包含中文,违反编码规范。
根据编码规范,代码中不应包含中文(包括注释)。请将中文注释改为英文。
📝 建议修改
📝 Committable suggestion
🤖 Prompt for AI Agents