cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburwell <>
Subject [GitHub] cloudstack pull request: [4.7] vmware: improve support for disks
Date Wed, 06 Apr 2016 21:42:25 GMT
Github user jburwell commented on a diff in the pull request:
    --- Diff: server/test/com/cloud/vm/ ---
    @@ -928,4 +928,13 @@ public void testUpdateVmNicIpFailure3() throws Exception {
    +    @Test
    +    public void testPersistDeviceBusInfo() {
    +        when(_vmMock.getDetail(any(String.class))).thenReturn(null);
    +        _userVmMgr.persistDeviceBusInfo(_vmMock, null);
    +        verify(_vmDao, times(0)).saveDetails(any(UserVmVO.class));
    +        _userVmMgr.persistDeviceBusInfo(_vmMock, "lsilogic");
    +        verify(_vmDao, times(1)).saveDetails(any(UserVmVO.class));
    --- End diff --
    Why not split these two ``verify`` into two separate test methods to better express the
scenario being tested?  It would help with diagnosing the specific failure and make the code
more maintainable.
    Also, please add test cases for when the ``existingVmRootDiskController`` is empty and
``rootDiskController`` is empty.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message