Add end-to-end integration tests for Vaultik

- Create comprehensive integration tests with mock S3 client
- Add in-memory filesystem and SQLite database support for testing
- Test full backup workflow including chunking, packing, and uploading
- Add test to verify encrypted blob content
- Fix scanner to use afero filesystem for temp file cleanup
- Demonstrate successful backup and verification with mock dependencies
This commit is contained in:
2025-07-26 15:52:23 +02:00
parent bb38f8c5d6
commit d7cd9aac27
8 changed files with 1974 additions and 1 deletions

View File

@@ -676,7 +676,7 @@ func (s *Scanner) handleBlobReady(blobWithReader *blob.BlobWithReader) error {
if err := blobWithReader.TempFile.Close(); err != nil {
log.Fatal("Failed to close temp file", "file", tempName, "error", err)
}
if err := os.Remove(tempName); err != nil {
if err := s.fs.Remove(tempName); err != nil {
log.Fatal("Failed to remove temp file", "file", tempName, "error", err)
}
}