jmsperu commented on PR #12898:
URL: https://github.com/apache/cloudstack/pull/12898#issuecomment-4757166622

   @DaanHoogland Thanks for the review — addressed both points in `0effda26e4`:
   
   **Method extraction** — pulled the inline enhancement logic into dedicated 
methods:
   - `LibvirtTakeBackupCommandWrapper`: extracted `appendEnhancementFlags()` + 
`writePassphraseFile()` (so `execute()` is a clean dispatch instead of a 
~40-line inline block)
   - `NASBackupProvider`: extracted `applyBackupEnhancementDetails()`
   
   (The shell side was already factored — `encrypt_backup()` / 
`verify_backup()` are standalone functions in `nasbackup.sh`.)
   
   **Testing** — added `LibvirtTakeBackupCommandWrapperTest` (5 cases: 
compression/bandwidth/integrity flag mapping, bandwidth=0 skip, encryption 
writes the 0600 passphrase file + `-e` flag, and fail-fast when encryption is 
enabled without a passphrase). The existing `NASBackupProviderTest` (14 cases, 
covering the details map) stays green — confirming the refactor is 
behavior-preserving.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to