fix(core): update

This commit is contained in:
2019-08-16 14:46:48 +02:00
parent c496405818
commit 927e2e0acc
4 changed files with 51 additions and 12 deletions

View File

@ -1,5 +1,6 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as docker from '../ts/index';
import { DockerService } from '../ts/index';
let testDockerHost: docker.DockerHost;
@ -37,7 +38,7 @@ tap.test('should remove a network', async () => {
tap.test('should pull an image from imagetag', async () => {
const image = await docker.DockerImage.createFromRegistry(testDockerHost, {
imageUrl: 'hosttoday/ht-docker-node',
tag: 'alpine'
imageTag: 'alpine'
});
expect(image).to.be.instanceOf(docker.DockerImage);
console.log(image);
@ -62,4 +63,14 @@ tap.test('should list all services', async tools => {
console.log(services);
});
tap.test('should create a service', async () => {
await DockerService.createService(testDockerHost, {
Image: 'nginx',
Labels: {
'testlabel': 'hi'
},
Name: 'testService'
});
});
tap.start();