Skip to content

Commit c90a3e6

Browse files
committed
review comments
1 parent 1912880 commit c90a3e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public void testExecuteWithRsyncFailure() throws Exception {
394394
.thenAnswer(invocation -> {
395395
String command = invocation.getArgument(0);
396396
if (command.contains("mount")) {
397-
return 0; // File exists
397+
return 0; // mount success
398398
} else if (command.contains("rsync")) {
399399
return 1; // Rsync failure
400400
}
@@ -453,7 +453,7 @@ public void testExecuteWithAttachVolumeFailure() throws Exception {
453453
.thenAnswer(invocation -> {
454454
String command = invocation.getArgument(0);
455455
if (command.contains("mount")) {
456-
return 0; // File exists
456+
return 0; // Mount success
457457
} else if (command.contains("rsync")) {
458458
return 0; // Rsync success
459459
}
@@ -551,6 +551,8 @@ public void testExecuteWithMultipleVolumes() throws Exception {
551551
filesMock.when(() -> Files.createTempDirectory(anyString())).thenReturn(tempPath);
552552

553553
try (MockedStatic<Script> scriptMock = mockStatic(Script.class)) {
554+
scriptMock.when(() -> Script.runSimpleBashScriptForExitValue(anyString()))
555+
.thenReturn(0); // All commands success
554556
scriptMock.when(() -> Script.runSimpleBashScriptForExitValue(anyString(), anyInt(), any(Boolean.class)))
555557
.thenReturn(0); // All commands success
556558

0 commit comments

Comments
 (0)