Skip to content

Commit a1df069

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-98 deleted test cases
1 parent 22917df commit a1df069

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed

plugins/storage/volume/ontap/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@
154154
<version>${maven-surefire-plugin.version}</version>
155155
<configuration>
156156
<skipTests>false</skipTests>
157+
<includes>
158+
<include>**/*Test.java</include>
159+
</includes>
157160
</configuration>
158161
<executions>
159162
<execution>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.apache.cloudstack.storage.lifecycle;
20+
21+
import org.junit.jupiter.api.BeforeEach;
22+
import org.junit.jupiter.api.Test;
23+
import org.junit.jupiter.api.extension.ExtendWith;
24+
import org.mockito.InjectMocks;
25+
import org.mockito.Mock;
26+
import org.mockito.MockedStatic;
27+
import org.mockito.Mockito;
28+
import org.mockito.junit.jupiter.MockitoExtension;
29+
import org.mockito.junit.jupiter.MockitoSettings;
30+
import org.mockito.quality.Strictness;
31+
import org.apache.cloudstack.storage.feign.model.Volume;
32+
import com.cloud.dc.dao.ClusterDao;
33+
import com.cloud.utils.exception.CloudRuntimeException;
34+
import com.cloud.dc.ClusterVO;
35+
import com.cloud.host.HostVO;
36+
import com.cloud.resource.ResourceManager;
37+
import com.cloud.storage.StorageManager;
38+
import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
39+
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
40+
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
41+
import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
42+
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
43+
import org.apache.cloudstack.storage.service.model.AccessGroup;
44+
import com.cloud.hypervisor.Hypervisor;
45+
import java.util.Map;
46+
import java.util.List;
47+
import java.util.ArrayList;
48+
import static org.mockito.ArgumentMatchers.any;
49+
import static org.mockito.ArgumentMatchers.anyLong;
50+
import static org.mockito.ArgumentMatchers.eq;
51+
import static org.mockito.Mockito.when;
52+
import static org.mockito.Mockito.verify;
53+
import static org.mockito.Mockito.times;
54+
import static org.mockito.Mockito.withSettings;
55+
import static org.junit.jupiter.api.Assertions.assertThrows;
56+
import static org.junit.jupiter.api.Assertions.assertTrue;
57+
import static org.junit.jupiter.api.Assertions.assertFalse;
58+
import java.util.HashMap;
59+
import org.apache.cloudstack.storage.provider.StorageProviderFactory;
60+
import org.apache.cloudstack.storage.service.StorageStrategy;
61+
import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
62+
import org.apache.cloudstack.storage.utils.Utility;
63+
64+
65+
@ExtendWith(MockitoExtension.class)
66+
@MockitoSettings(strictness = Strictness.LENIENT)
67+
public class OntapPrimaryDatastoreLifecycleTest {
68+
@InjectMocks
69+
private OntapPrimaryDatastoreLifecycle ontapPrimaryDatastoreLifecycle;
70+
71+
@Mock
72+
private ClusterDao _clusterDao;
73+
74+
@Mock
75+
private StorageStrategy storageStrategy;
76+
77+
@Mock
78+
private PrimaryDataStoreHelper _dataStoreHelper;
79+
80+
@Mock
81+
private ResourceManager _resourceMgr;
82+
83+
@Mock
84+
private StorageManager _storageMgr;
85+
86+
@Mock
87+
private StoragePoolDetailsDao storagePoolDetailsDao;
88+
89+
// Mock object that implements both DataStore and PrimaryDataStoreInfo
90+
// This is needed because attachCluster(DataStore) casts DataStore to PrimaryDataStoreInfo internally
91+
private DataStore dataStore;
92+
93+
@Mock
94+
private ClusterScope clusterScope;
95+
96+
@Mock
97+
private ZoneScope zoneScope;
98+
99+
private List<HostVO> mockHosts;
100+
private Map<String, String> poolDetails;
101+
102+
}

0 commit comments

Comments
 (0)