Skip to content

Commit a3a21b2

Browse files
committed
Fixed UT failures
1 parent a60dc0c commit a3a21b2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

server/src/test/java/org/apache/cloudstack/storage/object/BucketApiServiceImplTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public void testAllocBucket() throws ResourceAllocationException {
8282
Mockito.when(objectStoreVO.getId()).thenReturn(objectStoreId);
8383
Mockito.when(objectStoreDao.findById(poolId)).thenReturn(objectStoreVO);
8484
ObjectStoreEntity objectStore = Mockito.mock(ObjectStoreEntity.class);
85-
Mockito.when(objectStore.getId()).thenReturn(objectStoreId);
8685
Mockito.when(dataStoreMgr.getDataStore(objectStoreId, DataStoreRole.Object)).thenReturn(objectStore);
8786
Mockito.when(objectStore.createUser(accountId)).thenReturn(true);
8887

@@ -169,14 +168,12 @@ public void testUpdateBucket() throws ResourceAllocationException {
169168
Mockito.when(bucketDao.findById(bucketId)).thenReturn(bucket);
170169

171170
Account account = Mockito.mock(Account.class);
172-
Mockito.when(accountManager.getActiveAccountById(accountId)).thenReturn(account);
173171

174172
ObjectStoreVO objectStoreVO = Mockito.mock(ObjectStoreVO.class);
175173
Mockito.when(objectStoreVO.getId()).thenReturn(objectStoreId);
176174
Mockito.when(objectStoreDao.findById(objectStoreId)).thenReturn(objectStoreVO);
177175
ObjectStoreEntity objectStore = Mockito.mock(ObjectStoreEntity.class);
178176
Mockito.when(dataStoreMgr.getDataStore(objectStoreId, DataStoreRole.Object)).thenReturn(objectStore);
179-
Mockito.when(objectStore.deleteBucket(Mockito.any(BucketTO.class))).thenReturn(true);
180177

181178
bucketApiService.updateBucket(cmd, null);
182179

0 commit comments

Comments
 (0)