Skip to content

Add Unit Tests for Libvirt/KVM storage code - #986

Merged
asfgit merged 1 commit into
apache:masterfrom
wido:kvm-libvirt-unittests
Nov 2, 2015
Merged

asfgit merged 1 commit into
apache:masterfrom
wido:kvm-libvirt-unittests

Conversation

@wido

@wido wido commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

These classes were not covered by Unit Tests and this commit
adds some tests for their basic functionality.

These classes were not covered by Unit Tests and this commit
adds some tests for their basic functionality.
@miguelaferreira

Copy link
Copy Markdown
Contributor

awesome stuff. Checking it out now to build.

@miguelaferreira

Copy link
Copy Markdown
Contributor

Built the entire projects with:
mvn clean install -T4 -Pdeveloper,systemvm

Result:

(...)
Running com.cloud.hypervisor.kvm.storage.LibvirtStoragePoolTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.cloud.hypervisor.kvm.storage.LibvirtStoragePoolTest
(...)
Running com.cloud.hypervisor.kvm.storage.KVMPhysicalDiskTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.cloud.hypervisor.kvm.storage.KVMPhysicalDiskTest
(...)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache CloudStack Developer Tools - Checkstyle Configuration SUCCESS [  1.738 s]
[INFO] Apache CloudStack .................................. SUCCESS [  1.955 s]
[INFO] Apache CloudStack Maven Conventions Parent ......... SUCCESS [  1.580 s]
[INFO] Apache CloudStack Framework - Managed Context ...... SUCCESS [  6.388 s]
[INFO] Apache CloudStack Utils ............................ SUCCESS [ 23.225 s]
[INFO] Apache CloudStack Framework ........................ SUCCESS [  0.571 s]
[INFO] Apache CloudStack Framework - Event Notification ... SUCCESS [ 16.200 s]
[INFO] Apache CloudStack Framework - Configuration ........ SUCCESS [  6.074 s]
[INFO] Apache CloudStack API .............................. SUCCESS [ 29.501 s]
[INFO] Apache CloudStack Framework - REST ................. SUCCESS [  6.992 s]
[INFO] Apache CloudStack Framework - IPC .................. SUCCESS [  6.391 s]
[INFO] Apache CloudStack Cloud Engine ..................... SUCCESS [  0.588 s]
[INFO] Apache CloudStack Cloud Engine API ................. SUCCESS [  7.042 s]
[INFO] Apache CloudStack Framework - Security ............. SUCCESS [  3.619 s]
[INFO] Apache CloudStack Core ............................. SUCCESS [ 30.846 s]
[INFO] Apache CloudStack Agents ........................... SUCCESS [ 11.635 s]
[INFO] Apache CloudStack Framework - Clustering ........... SUCCESS [  6.206 s]
[INFO] Apache CloudStack Framework - Event Notification ... SUCCESS [  4.907 s]
[INFO] Apache CloudStack Cloud Engine Schema Component .... SUCCESS [ 27.267 s]
[INFO] Apache CloudStack Framework - Jobs ................. SUCCESS [  7.779 s]
[INFO] Apache CloudStack Cloud Engine Internal Components API SUCCESS [  5.547 s]
[INFO] Apache CloudStack Server ........................... SUCCESS [ 55.884 s]
[INFO] Apache CloudStack Usage Server ..................... SUCCESS [ 14.422 s]
[INFO] Apache CloudStack Cloud Engine Orchestration Component SUCCESS [ 16.340 s]
[INFO] Apache CloudStack Cloud Services ................... SUCCESS [  0.610 s]
[INFO] Apache CloudStack Secondary Storage ................ SUCCESS [  2.316 s]
[INFO] Apache CloudStack Secondary Storage Service ........ SUCCESS [ 12.204 s]
[INFO] Apache CloudStack Engine Storage Component ......... SUCCESS [ 16.915 s]
[INFO] Apache CloudStack Engine Storage Volume Component .. SUCCESS [ 10.965 s]
[INFO] Apache CloudStack Engine Storage Image Component ... SUCCESS [  6.521 s]
[INFO] Apache CloudStack Engine Storage Data Motion Component SUCCESS [  4.772 s]
[INFO] Apache CloudStack Engine Storage Cache Component ... SUCCESS [  5.597 s]
[INFO] Apache CloudStack Engine Storage Snapshot Component  SUCCESS [ 13.591 s]
[INFO] Apache CloudStack Cloud Engine API ................. SUCCESS [  4.421 s]
[INFO] Apache CloudStack Cloud Engine Service ............. SUCCESS [ 11.432 s]
[INFO] Apache CloudStack Plugin POM ....................... SUCCESS [  1.061 s]
[INFO] Apache CloudStack Plugin - API Rate Limit .......... SUCCESS [ 14.721 s]
[INFO] Apache CloudStack Plugin - Storage Volume default provider SUCCESS [  5.161 s]
[INFO] Apache CloudStack Plugin - Storage Volume SolidFire Provider SUCCESS [  8.852 s]
[INFO] Apache CloudStack Plugin - API SolidFire ........... SUCCESS [  4.086 s]
[INFO] Apache CloudStack Plugin - API Discovery ........... SUCCESS [ 11.596 s]
[INFO] Apache CloudStack Plugin - ACL Static Role Based ... SUCCESS [  6.057 s]
[INFO] Apache CloudStack Plugin - Host Anti-Affinity Processor SUCCESS [  5.358 s]
[INFO] Apache CloudStack Plugin - Explicit Dedication Processor SUCCESS [  5.964 s]
[INFO] Apache CloudStack Plugin - User Concentrated Pod Deployment Planner SUCCESS [  5.667 s]
[INFO] Apache CloudStack Plugin - User Dispersing Deployment Planner SUCCESS [  6.239 s]
[INFO] Apache CloudStack Plugin - Implicit Dedication Planner SUCCESS [ 18.381 s]
[INFO] Apache CloudStack Plugin - Skip Heurestics Planner . SUCCESS [  5.848 s]
[INFO] Apache CloudStack Plugin - Host Allocator Random ... SUCCESS [  6.566 s]
[INFO] Apache CloudStack Plugin - Dedicated Resources ..... SUCCESS [ 17.536 s]
[INFO] Apache CloudStack Plugin - Hypervisor OracleVM ..... SUCCESS [ 10.306 s]
[INFO] Apache CloudStack Plugin - Open vSwitch ............ SUCCESS [ 10.900 s]
[INFO] Apache CloudStack Plugin - Hypervisor XenServer .... SUCCESS [ 18.669 s]
[INFO] Apache CloudStack Plugin - Hypervisor KVM .......... SUCCESS [ 24.436 s]
[INFO] Apache CloudStack Plugin - RabbitMQ Event Bus ...... SUCCESS [  5.717 s]
[INFO] Apache CloudStack Plugin - In Memory Event Bus ..... SUCCESS [  9.559 s]
[INFO] Apache CloudStack Plugin - Kafka Event Bus ......... SUCCESS [  5.057 s]
[INFO] Apache CloudStack Plugin - Hypervisor Baremetal .... SUCCESS [ 10.001 s]
[INFO] Apache CloudStack Plugin - Hypervisor UCS .......... SUCCESS [  6.860 s]
[INFO] Apache CloudStack Plugin - Hypervisor Hyper-V ...... SUCCESS [ 13.461 s]
[INFO] Apache CloudStack Plugin - Hypervisor OracleVM3 .... SUCCESS [ 39.977 s]
[INFO] Apache CloudStack Plugin - Network Elastic Load Balancer SUCCESS [ 13.604 s]
[INFO] Apache CloudStack Plugin - Network Internal Load Balancer SUCCESS [ 20.302 s]
[INFO] Apache CloudStack Framework - Spring Life Cycle .... SUCCESS [  4.700 s]
[INFO] Apache CloudStack Plugin - Network Juniper Contrail  SUCCESS [ 17.889 s]
[INFO] Apache CloudStack Plugin - Palo Alto ............... SUCCESS [ 16.992 s]
[INFO] Apache CloudStack Plugin - Network Netscaler ....... SUCCESS [  9.669 s]
[INFO] Apache CloudStack Plugin - Network Nicira NVP ...... SUCCESS [ 31.030 s]
[INFO] Apache CloudStack Plugin - BigSwitch Virtual Network Segment SUCCESS [ 23.760 s]
[INFO] Apache CloudStack Plugin - Network Brocade VCS ..... SUCCESS [ 22.944 s]
[INFO] Apache CloudStack Plugin - Midokura Midonet ........ SUCCESS [ 11.592 s]
[INFO] Apache CloudStack Plugin - Stratosphere SSP ........ SUCCESS [ 15.709 s]
[INFO] Apache CloudStack Plugin - Network Opendaylight .... SUCCESS [ 15.177 s]
[INFO] Apache CloudStack Plugin - Storage Allocator Random  SUCCESS [  4.508 s]
[INFO] Apache CloudStack Plugin - User Authenticator LDAP . SUCCESS [  9.724 s]
[INFO] Apache CloudStack Plugin - User Authenticator MD5 .. SUCCESS [ 11.031 s]
[INFO] Apache CloudStack Plugin - User Authenticator PBKDF2-SHA-256 SUCCESS [ 15.964 s]
[INFO] Apache CloudStack Plugin - User Authenticator Plain Text SUCCESS [  5.774 s]
[INFO] Apache CloudStack Plugin - User Authenticator SAML2  SUCCESS [01:57 min]
[INFO] Apache CloudStack Plugin - User Authenticator SHA256 Salted SUCCESS [ 10.409 s]
[INFO] Apache CloudStack Plugin - Dns Notifier Example .... SUCCESS [  4.716 s]
[INFO] Apache CloudStack Plugin - Storage Image S3 ........ SUCCESS [  4.298 s]
[INFO] Apache CloudStack Plugin - Storage Image Swift provider SUCCESS [  4.689 s]
[INFO] Apache CloudStack Plugin - Storage Image default provider SUCCESS [  5.080 s]
[INFO] Apache CloudStack Plugin - Storage Image sample provider SUCCESS [  4.582 s]
[INFO] Apache CloudStack Plugin - Storage Volume Nexenta Provider SUCCESS [  8.097 s]
[INFO] Apache CloudStack Plugin - Storage Volume CloudByte Provider SUCCESS [  6.989 s]
[INFO] Apache CloudStack Plugin - Storage Volume sample provider SUCCESS [  4.314 s]
[INFO] Apache CloudStack Plugin - SNMP Alerts ............. SUCCESS [ 12.107 s]
[INFO] Apache CloudStack Plugin - Syslog Alerts ........... SUCCESS [ 10.735 s]
[INFO] Apache CloudStack Plugin - Network VXLAN ........... SUCCESS [ 12.001 s]
[INFO] Apache CloudStack Plugin - GloboDNS ................ SUCCESS [ 17.996 s]
[INFO] Apache CloudStack Framework - Spring Module ........ SUCCESS [ 15.186 s]
[INFO] Apache CloudStack Secondary Storage Controller ..... SUCCESS [  7.597 s]
[INFO] Apache CloudStack Console Proxy - RDP Client ....... SUCCESS [ 20.144 s]
[INFO] Apache CloudStack Console Proxy .................... SUCCESS [  1.586 s]
[INFO] Apache CloudStack Console Proxy - Server ........... SUCCESS [  8.564 s]
[INFO] Apache CloudStack System VM ........................ SUCCESS [ 26.053 s]
[INFO] Apache CloudStack Client UI ........................ SUCCESS [ 24.879 s]
[INFO] Apache CloudStack Framework - QuickCloud ........... SUCCESS [  1.194 s]
[INFO] Apache CloudStack Test ............................. SUCCESS [  2.318 s]
[INFO] Apache CloudStack Developer Mode ................... SUCCESS [  2.336 s]
[INFO] Apache CloudStack Developer Tools .................. SUCCESS [  1.015 s]
[INFO] Apache CloudStack apidocs .......................... SUCCESS [ 31.417 s]
[INFO] Apache CloudStack marvin ........................... SUCCESS [  9.479 s]
[INFO] Apache CloudStack DevCloud ......................... SUCCESS [  3.748 s]
[INFO] Apache CloudStack DevCloud4 ........................ SUCCESS [  2.003 s]
[INFO] Apache CloudStack DevCloud-KVM ..................... SUCCESS [  1.766 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:11 min (Wall Clock)
[INFO] Finished at: 2015-10-27T13:38:58+01:00
[INFO] Final Memory: 111M/1586M
[INFO] ------------------------------------------------------------------------

Thanks! 👍

@DaanHoogland

Copy link
Copy Markdown
Contributor

reviewed code and trusting travis this LGTM

@borisroman

Copy link
Copy Markdown
Contributor

@wido LGTM 👍

Running com.cloud.hypervisor.kvm.storage.LibvirtStoragePoolTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in com.cloud.hypervisor.kvm.storage.LibvirtStoragePoolTest
Running com.cloud.hypervisor.kvm.storage.KVMPhysicalDiskTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in com.cloud.hypervisor.kvm.storage.KVMPhysicalDiskTest
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache CloudStack Developer Tools - Checkstyle Configuration  SUCCESS [0.926s]
[INFO] Apache CloudStack ................................. SUCCESS [1.015s]
[INFO] Apache CloudStack Maven Conventions Parent ........ SUCCESS [0.600s]
[INFO] Apache CloudStack Framework - Managed Context ..... SUCCESS [2.251s]
[INFO] Apache CloudStack Utils ........................... SUCCESS [14.714s]
[INFO] Apache CloudStack Framework ....................... SUCCESS [0.026s]
[INFO] Apache CloudStack Framework - Event Notification .. SUCCESS [3.858s]
[INFO] Apache CloudStack Framework - Configuration ....... SUCCESS [1.838s]
[INFO] Apache CloudStack API ............................. SUCCESS [8.062s]
[INFO] Apache CloudStack Framework - REST ................ SUCCESS [1.418s]
[INFO] Apache CloudStack Framework - IPC ................. SUCCESS [1.887s]
[INFO] Apache CloudStack Cloud Engine .................... SUCCESS [0.020s]
[INFO] Apache CloudStack Cloud Engine API ................ SUCCESS [2.220s]
[INFO] Apache CloudStack Framework - Security ............ SUCCESS [0.850s]
[INFO] Apache CloudStack Core ............................ SUCCESS [11.038s]
[INFO] Apache CloudStack Agents .......................... SUCCESS [3.030s]
[INFO] Apache CloudStack Framework - Clustering .......... SUCCESS [2.246s]
[INFO] Apache CloudStack Framework - Event Notification .. SUCCESS [0.744s]
[INFO] Apache CloudStack Cloud Engine Schema Component ... SUCCESS [7.960s]
[INFO] Apache CloudStack Framework - Jobs ................ SUCCESS [2.378s]
[INFO] Apache CloudStack Cloud Engine Internal Components API  SUCCESS [1.317s]
[INFO] Apache CloudStack Server .......................... SUCCESS [26.048s]
[INFO] Apache CloudStack Usage Server .................... SUCCESS [2.796s]
[INFO] Apache CloudStack Cloud Engine Orchestration Component  SUCCESS [3.765s]
[INFO] Apache CloudStack Cloud Services .................. SUCCESS [0.026s]
[INFO] Apache CloudStack Secondary Storage ............... SUCCESS [0.151s]
[INFO] Apache CloudStack Secondary Storage Service ....... SUCCESS [2.512s]
[INFO] Apache CloudStack Engine Storage Component ........ SUCCESS [2.983s]
[INFO] Apache CloudStack Engine Storage Volume Component . SUCCESS [1.983s]
[INFO] Apache CloudStack Engine Storage Image Component .. SUCCESS [1.423s]
[INFO] Apache CloudStack Engine Storage Data Motion Component  SUCCESS [1.427s]
[INFO] Apache CloudStack Engine Storage Cache Component .. SUCCESS [1.079s]
[INFO] Apache CloudStack Engine Storage Snapshot Component  SUCCESS [3.978s]
[INFO] Apache CloudStack Cloud Engine API ................ SUCCESS [0.742s]
[INFO] Apache CloudStack Cloud Engine Service ............ SUCCESS [3.410s]
[INFO] Apache CloudStack Plugin POM ...................... SUCCESS [0.146s]
[INFO] Apache CloudStack Plugin - API Rate Limit ......... SUCCESS [3.337s]
[INFO] Apache CloudStack Plugin - Storage Volume default provider  SUCCESS [1.043s]
[INFO] Apache CloudStack Plugin - Storage Volume SolidFire Provider  SUCCESS [2.149s]
[INFO] Apache CloudStack Plugin - API SolidFire .......... SUCCESS [0.995s]
[INFO] Apache CloudStack Plugin - API Discovery .......... SUCCESS [1.887s]
[INFO] Apache CloudStack Plugin - ACL Static Role Based .. SUCCESS [0.729s]
[INFO] Apache CloudStack Plugin - Host Anti-Affinity Processor  SUCCESS [0.755s]
[INFO] Apache CloudStack Plugin - Explicit Dedication Processor  SUCCESS [0.942s]
[INFO] Apache CloudStack Plugin - User Concentrated Pod Deployment Planner  SUCCESS [0.779s]
[INFO] Apache CloudStack Plugin - User Dispersing Deployment Planner  SUCCESS [0.772s]
[INFO] Apache CloudStack Plugin - Implicit Dedication Planner  SUCCESS [2.576s]
[INFO] Apache CloudStack Plugin - Skip Heurestics Planner  SUCCESS [0.695s]
[INFO] Apache CloudStack Plugin - Host Allocator Random .. SUCCESS [0.795s]
[INFO] Apache CloudStack Plugin - Dedicated Resources .... SUCCESS [2.694s]
[INFO] Apache CloudStack Plugin - Hypervisor OracleVM .... SUCCESS [1.278s]
[INFO] Apache CloudStack Plugin - Open vSwitch ........... SUCCESS [1.533s]
[INFO] Apache CloudStack Plugin - Hypervisor XenServer ... SUCCESS [4.726s]
[INFO] Apache CloudStack Plugin - Hypervisor KVM ......... SUCCESS [5.134s]
[INFO] Apache CloudStack Plugin - RabbitMQ Event Bus ..... SUCCESS [0.855s]
[INFO] Apache CloudStack Plugin - In Memory Event Bus .... SUCCESS [1.691s]
[INFO] Apache CloudStack Plugin - Kafka Event Bus ........ SUCCESS [0.728s]
[INFO] Apache CloudStack Plugin - Hypervisor Baremetal ... SUCCESS [1.740s]
[INFO] Apache CloudStack Plugin - Hypervisor UCS ......... SUCCESS [1.090s]
[INFO] Apache CloudStack Plugin - Hypervisor Hyper-V ..... SUCCESS [2.494s]
[INFO] Apache CloudStack Plugin - Hypervisor OracleVM3 ... SUCCESS [13.816s]
[INFO] Apache CloudStack Plugin - Network Elastic Load Balancer  SUCCESS [2.487s]
[INFO] Apache CloudStack Plugin - Network Internal Load Balancer  SUCCESS [3.839s]
[INFO] Apache CloudStack Framework - Spring Life Cycle ... SUCCESS [0.866s]
[INFO] Apache CloudStack Plugin - Network Juniper Contrail  SUCCESS [7.137s]
[INFO] Apache CloudStack Plugin - Palo Alto .............. SUCCESS [2.842s]
[INFO] Apache CloudStack Plugin - Network Netscaler ...... SUCCESS [1.763s]
[INFO] Apache CloudStack Plugin - Network Nicira NVP ..... SUCCESS [6.101s]
[INFO] Apache CloudStack Plugin - BigSwitch Virtual Network Segment  SUCCESS [4.328s]
[INFO] Apache CloudStack Plugin - Network Brocade VCS .... SUCCESS [4.249s]
[INFO] Apache CloudStack Plugin - Midokura Midonet ....... SUCCESS [2.670s]
[INFO] Apache CloudStack Plugin - Stratosphere SSP ....... SUCCESS [2.551s]
[INFO] Apache CloudStack Plugin - Network Opendaylight ... SUCCESS [2.688s]
[INFO] Apache CloudStack Plugin - Storage Allocator Random  SUCCESS [0.806s]
[INFO] Apache CloudStack Plugin - User Authenticator LDAP  SUCCESS [1.522s]
[INFO] Apache CloudStack Plugin - User Authenticator MD5 . SUCCESS [1.825s]
[INFO] Apache CloudStack Plugin - User Authenticator PBKDF2-SHA-256  SUCCESS [2.566s]
[INFO] Apache CloudStack Plugin - User Authenticator Plain Text  SUCCESS [0.737s]
[INFO] Apache CloudStack Plugin - User Authenticator SAML2  SUCCESS [19.703s]
[INFO] Apache CloudStack Plugin - User Authenticator SHA256 Salted  SUCCESS [1.751s]
[INFO] Apache CloudStack Plugin - Dns Notifier Example ... SUCCESS [0.703s]
[INFO] Apache CloudStack Plugin - Storage Image S3 ....... SUCCESS [0.885s]
[INFO] Apache CloudStack Plugin - Storage Image Swift provider  SUCCESS [0.980s]
[INFO] Apache CloudStack Plugin - Storage Image default provider  SUCCESS [1.020s]
[INFO] Apache CloudStack Plugin - Storage Image sample provider  SUCCESS [0.791s]
[INFO] Apache CloudStack Plugin - Storage Volume Nexenta Provider  SUCCESS [1.747s]
[INFO] Apache CloudStack Plugin - Storage Volume CloudByte Provider  SUCCESS [1.367s]
[INFO] Apache CloudStack Plugin - Storage Volume sample provider  SUCCESS [0.858s]
[INFO] Apache CloudStack Plugin - SNMP Alerts ............ SUCCESS [1.754s]
[INFO] Apache CloudStack Plugin - Syslog Alerts .......... SUCCESS [1.508s]
[INFO] Apache CloudStack Plugin - Network VXLAN .......... SUCCESS [1.972s]
[INFO] Apache CloudStack Plugin - GloboDNS ............... SUCCESS [3.640s]
[INFO] Apache CloudStack Framework - Spring Module ....... SUCCESS [2.481s]
[INFO] Apache CloudStack Secondary Storage Controller .... SUCCESS [1.364s]
[INFO] Apache CloudStack Client UI ....................... SUCCESS [7.129s]
[INFO] Apache CloudStack Console Proxy - RDP Client ...... SUCCESS [4.887s]
[INFO] Apache CloudStack Console Proxy ................... SUCCESS [0.150s]
[INFO] Apache CloudStack Console Proxy - Server .......... SUCCESS [2.112s]
[INFO] Apache CloudStack Framework - QuickCloud .......... SUCCESS [0.061s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:42.960s
[INFO] Finished at: Tue Oct 27 13:57:24 CET 2015
[INFO] Final Memory: 97M/785M
[INFO] ------------------------------------------------------------------------

@borisroman

Copy link
Copy Markdown
Contributor

Ping @remibergsma, when Jenkins is happy to may merge.

@asfgit
asfgit merged commit 7568f21 into apache:master Nov 2, 2015
asfgit pushed a commit that referenced this pull request Nov 2, 2015
Add Unit Tests for Libvirt/KVM storage codeThese classes were not covered by Unit Tests and this commit
adds some tests for their basic functionality.

* pr/986:
  Add Unit Tests for Libvirt/KVM storage code

Signed-off-by: Remi Bergsma <github@remi.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants