docker/test/test.ts

29 lines
871 B
TypeScript
Raw Normal View History

2018-07-16 21:52:50 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
import { DockerHost } from '../ts/index';
2017-04-02 10:05:29 +00:00
2018-07-16 21:52:50 +00:00
let testDockerHost: DockerHost;
2017-04-02 10:05:29 +00:00
2018-07-16 21:52:50 +00:00
tap.test('should create a new Dockersock instance', async () => {
testDockerHost = new DockerHost();
return expect(testDockerHost).to.be.instanceof(DockerHost);
});
2017-04-02 10:05:29 +00:00
2018-07-16 21:52:50 +00:00
tap.test('should list containers', async () => {
const containers = await testDockerHost.getContainers();
console.log(containers);
});
2017-04-02 10:05:29 +00:00
2018-07-16 21:52:50 +00:00
/*
tap.test('should pull an image from imagetag', async () => {
await testDockerHost.pullImage('hosttoday/ht-docker-node:npmci');
});
2017-04-02 10:05:29 +00:00
2018-07-16 21:52:50 +00:00
tap.skip.test('should return a change Objservable', async () => {
let myObservable = testDockerHost.getChangeObservable();
testDockerHost.endRequests();
let testPromise = observableToPromise(myObservable);
return await expect(testPromise).to.eventually.be.fulfilled;
}); */
2017-04-02 10:05:29 +00:00
2018-07-16 21:52:50 +00:00
tap.start();