feat(imagestore): now processing images with extraction, retagging, repackaging and long term storage

This commit is contained in:
2024-06-08 15:03:19 +02:00
parent 740f83114c
commit c0cebbe614
13 changed files with 241 additions and 90 deletions

View File

@ -9,6 +9,7 @@ let testDockerHost: docker.DockerHost;
tap.test('should create a new Dockersock instance', async () => {
testDockerHost = new docker.DockerHost({});
await testDockerHost.start();
return expect(testDockerHost).toBeInstanceOf(docker.DockerHost);
});
@ -118,7 +119,7 @@ tap.test('should create a service', async () => {
await testSecret.remove();
});
tap.test('should export images', async (toolsArg) => {
tap.skip.test('should export images', async (toolsArg) => {
const done = toolsArg.defer();
const testImage = await docker.DockerImage.createFromRegistry(testDockerHost, {
creationObject: {
@ -135,7 +136,7 @@ tap.test('should export images', async (toolsArg) => {
await done.promise;
});
tap.test('should import images', async (toolsArg) => {
tap.skip.test('should import images', async (toolsArg) => {
const done = toolsArg.defer();
const fsReadStream = plugins.smartfile.fsStream.createReadStream(
plugins.path.join(paths.nogitDir, 'testimage.tar')
@ -146,6 +147,10 @@ tap.test('should import images', async (toolsArg) => {
imageUrl: 'code.foss.global/host.today/ht-docker-node:latest',
}
})
});
tap.test('should expose a working DockerImageStore', async () => {
await testDockerHost.imageStore.storeImage('hello', plugins.smartfile.fsStream.createReadStream(plugins.path.join(paths.nogitDir, 'testimage.tar')));
})
export default tap.start();