fix: update VFS test for v5.2.0 BlobStorage architecture
Updated test to check storage.type instead of expecting rawData in metadata, reflecting Phase 1 (Unified BlobStorage) changes where file content is stored in BlobStorage rather than entity metadata. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
1874b77896
commit
b3e3e5c7c2
1 changed files with 7 additions and 9 deletions
|
|
@ -139,8 +139,8 @@ describe('VFS Bug Fixes', () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should correctly handle rawData storage without compression', async () => {
|
it('should correctly handle file storage via BlobStorage (v5.2.0)', async () => {
|
||||||
const content = 'Test content for rawData'
|
const content = 'Test content for BlobStorage'
|
||||||
|
|
||||||
// Write file
|
// Write file
|
||||||
await vfs.writeFile('/test.md', content)
|
await vfs.writeFile('/test.md', content)
|
||||||
|
|
@ -148,14 +148,12 @@ describe('VFS Bug Fixes', () => {
|
||||||
// Get the entity to inspect storage
|
// Get the entity to inspect storage
|
||||||
const entity = await vfs.getEntity('/test.md')
|
const entity = await vfs.getEntity('/test.md')
|
||||||
|
|
||||||
// Should have rawData in metadata
|
// v5.2.0: Content is in BlobStorage, not rawData
|
||||||
expect(entity.metadata.rawData).toBeDefined()
|
expect(entity.metadata.storage).toBeDefined()
|
||||||
|
expect(entity.metadata.storage.type).toBe('blob')
|
||||||
|
expect(entity.metadata.size).toBe(content.length)
|
||||||
|
|
||||||
// rawData should be base64 encoded
|
// Read should work correctly (retrieves from BlobStorage)
|
||||||
const decodedRawData = Buffer.from(entity.metadata.rawData!, 'base64').toString('utf8')
|
|
||||||
expect(decodedRawData).toBe(content)
|
|
||||||
|
|
||||||
// Read should work without decompression issues
|
|
||||||
const readContent = await vfs.readFile('/test.md')
|
const readContent = await vfs.readFile('/test.md')
|
||||||
expect(readContent.toString('utf8')).toBe(content)
|
expect(readContent.toString('utf8')).toBe(content)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue