Skip to content

Commit 48d074a

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-112 Fix Test case issues
1 parent 9bf66e6 commit 48d074a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/StorageStrategyTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void disableLogicalAccess(Map<String, String> values) {
178178
void setUp() {
179179
// Create OntapStorage using constructor (immutable object)
180180
OntapStorage ontapStorage = new OntapStorage("admin", "password", "192.168.1.100",
181-
"svm1", null, ProtocolType.NFS3, false);
181+
"svm1", null, ProtocolType.NFS3);
182182

183183
// Note: In real implementation, StorageStrategy constructor creates Feign clients
184184
// For testing, we'll need to mock the FeignClientFactory behavior
@@ -277,7 +277,7 @@ public void testConnect_iscsiNotEnabled() {
277277
// Note: Protocol validation is currently broken in StorageStrategy (enum vs string comparison)
278278
// so this test verifies connection succeeds even when iSCSI is disabled
279279
OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100",
280-
"svm1", null, ProtocolType.ISCSI, false);
280+
"svm1", null, ProtocolType.ISCSI);
281281
storageStrategy = new TestableStorageStrategy(iscsiStorage,
282282
aggregateFeignClient, volumeFeignClient, svmFeignClient,
283283
jobFeignClient, networkFeignClient, sanFeignClient);
@@ -594,7 +594,7 @@ public void testDeleteStorageVolume_feignException() {
594594
public void testGetStoragePath_iscsi() {
595595
// Setup - recreate with iSCSI protocol
596596
OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100",
597-
"svm1", null, ProtocolType.ISCSI, false);
597+
"svm1", null, ProtocolType.ISCSI);
598598
storageStrategy = new TestableStorageStrategy(iscsiStorage,
599599
aggregateFeignClient, volumeFeignClient, svmFeignClient,
600600
jobFeignClient, networkFeignClient, sanFeignClient);
@@ -624,7 +624,7 @@ public void testGetStoragePath_iscsi() {
624624
public void testGetStoragePath_iscsi_noService() {
625625
// Setup - recreate with iSCSI protocol
626626
OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100",
627-
"svm1", null, ProtocolType.ISCSI, false);
627+
"svm1", null, ProtocolType.ISCSI);
628628
storageStrategy = new TestableStorageStrategy(iscsiStorage,
629629
aggregateFeignClient, volumeFeignClient, svmFeignClient,
630630
jobFeignClient, networkFeignClient, sanFeignClient);
@@ -645,7 +645,7 @@ public void testGetStoragePath_iscsi_noService() {
645645
public void testGetStoragePath_iscsi_noTargetIqn() {
646646
// Setup - recreate with iSCSI protocol
647647
OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100",
648-
"svm1", null, ProtocolType.ISCSI, false);
648+
"svm1", null, ProtocolType.ISCSI);
649649
storageStrategy = new TestableStorageStrategy(iscsiStorage,
650650
aggregateFeignClient, volumeFeignClient, svmFeignClient,
651651
jobFeignClient, networkFeignClient, sanFeignClient);
@@ -695,7 +695,7 @@ public void testGetNetworkInterface_nfs() {
695695
public void testGetNetworkInterface_iscsi() {
696696
// Setup - recreate with iSCSI protocol
697697
OntapStorage iscsiStorage = new OntapStorage("admin", "password", "192.168.1.100",
698-
"svm1", null, ProtocolType.ISCSI, false);
698+
"svm1", null, ProtocolType.ISCSI);
699699
storageStrategy = new TestableStorageStrategy(iscsiStorage,
700700
aggregateFeignClient, volumeFeignClient, svmFeignClient,
701701
jobFeignClient, networkFeignClient, sanFeignClient);

plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedNASStrategyTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ public void setUp() throws Exception {
122122
"192.168.1.100",
123123
"svm1",
124124
100L,
125-
ProtocolType.NFS3,
126-
false
125+
ProtocolType.NFS3
127126
);
128127
strategy = new TestableUnifiedNASStrategy(ontapStorage, nasFeignClient, volumeFeignClient, jobFeignClient, aggregateFeignClient, svmFeignClient, networkFeignClient, sanFeignClient);
129128
injectField("volumeDao", volumeDao);

0 commit comments

Comments
 (0)