Conversation
|
@abh1sar @Pearl1594 @winterhazel , I did a merge forward and after hours of fixing still have some unit test problems. In general I feel quite unsure if all your PRs came out of my tinkering ok. Can you have a look please? |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12644 +/- ##
=============================================
- Coverage 17.62% 3.70% -13.92%
=============================================
Files 5917 448 -5469
Lines 531255 38018 -493237
Branches 64951 7035 -57916
=============================================
- Hits 93639 1409 -92230
+ Misses 427077 36422 -390655
+ Partials 10539 187 -10352
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java
Outdated
Show resolved
Hide resolved
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java
Outdated
Show resolved
Hide resolved
| PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class); | ||
| when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore)); | ||
| when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123")); | ||
| when(command.getRestoreVolumeUUID()).thenReturn("volume-123"); |
There was a problem hiding this comment.
Add when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Outdated
Show resolved
Hide resolved
| PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class); | ||
| when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore)); | ||
| when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123")); | ||
| when(command.getRestoreVolumeUUID()).thenReturn("volume-123"); |
There was a problem hiding this comment.
Add when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
| PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class); | ||
| when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore)); | ||
| when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123")); | ||
| when(command.getRestoreVolumeUUID()).thenReturn("volume-123"); |
There was a problem hiding this comment.
Add when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
| PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class); | ||
| when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore)); | ||
| lenient().when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123")); | ||
| lenient().when(command.getRestoreVolumeUUID()).thenReturn("volume-123"); |
There was a problem hiding this comment.
Add when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
...ava/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java
Show resolved
Hide resolved
...ava/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java
Show resolved
Hide resolved
| import com.cloud.vm.snapshot.VMSnapshot; | ||
| import org.apache.cloudstack.quota.constant.QuotaTypes; | ||
|
|
||
| public class Value extends GenericPresetVariable { |
There was a problem hiding this comment.
provisioningType and volumeType need to be converted to Strings in this class
...ava/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java
Show resolved
Hide resolved
...ava/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java
Show resolved
Hide resolved
...ava/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java
Show resolved
Hide resolved
|
thanks @abh1sar @winterhazel , I will give it another go this afternoon/evening |
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Outdated
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Outdated
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Outdated
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Outdated
Show resolved
Hide resolved
|
@abh1sar more errors can you give a clue? cc @Pearl1594 |
@DaanHoogland this is not an error. it is an expected exception.
Do you have logs for the 3 Errors? I don't see this in the current failed build logs |
be07299 to
c7f300f
Compare
abh1sar
left a comment
There was a problem hiding this comment.
when(command.getBackupFiles()). .. is missing from 3 places
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
|
merge forward based on advice here done directly |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?