feat(tests): Add comprehensive tests for Docker image export and streaming functionality

This commit is contained in:
2025-08-18 23:41:16 +00:00
parent ffdc61fb42
commit 87f26b7b63
7 changed files with 124 additions and 11 deletions

View File

@@ -139,17 +139,17 @@ tap.test('should export images', async (toolsArg) => {
await done.promise;
});
tap.test('should import images', async (toolsArg) => {
const done = toolsArg.defer();
tap.test('should import images', async () => {
const fsReadStream = plugins.smartfile.fsStream.createReadStream(
plugins.path.join(paths.nogitDir, 'testimage.tar')
);
await docker.DockerImage.createFromTarStream(testDockerHost, {
const importedImage = await docker.DockerImage.createFromTarStream(testDockerHost, {
tarStream: fsReadStream,
creationObject: {
imageUrl: 'code.foss.global/host.today/ht-docker-node:latest',
}
})
});
expect(importedImage).toBeInstanceOf(docker.DockerImage);
});
tap.test('should expose a working DockerImageStore', async () => {