fix(core): shift to new style

This commit is contained in:
2018-07-16 23:52:50 +02:00
parent 7009e07ecc
commit a037cba454
23 changed files with 595 additions and 1561 deletions

View File

@ -1,34 +1,28 @@
import "typings-global";
import { expect, tap } from 'tapbundle'
import * as observableToPromise from 'observable-to-promise'
import { Dockersock } from "../dist/index";
import { expect, tap } from '@pushrocks/tapbundle';
import { DockerHost } from '../ts/index';
let testDockersock: Dockersock;
let testDockerHost: DockerHost;
tap.test("should create a new Dockersock instance", async () => {
testDockersock = new Dockersock();
return expect(testDockersock).to.be.instanceof(Dockersock);
})
tap.test('should create a new Dockersock instance', async () => {
testDockerHost = new DockerHost();
return expect(testDockerHost).to.be.instanceof(DockerHost);
});
tap.test("should list containers", async () => {
let data = await testDockersock.listContainers()
console.log(data)
})
tap.test('should list containers', async () => {
const containers = await testDockerHost.getContainers();
console.log(containers);
});
tap.test("should list detailed containers", async () => {
let data = await testDockersock.listContainersDetailed()
console.log(data)
})
/*
tap.test('should pull an image from imagetag', async () => {
await testDockerHost.pullImage('hosttoday/ht-docker-node:npmci');
});
tap.test("should pull an image from imagetag", async () => {
await testDockersock.pullImage("hosttoday/ht-docker-node:npmci")
})
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;
}); */
tap.skip.test("should return a change Objservable", async () => {
let myObservable = testDockersock.getChangeObservable();
testDockersock.endRequests();
let testPromise = observableToPromise(myObservable)
return await expect(testPromise).to.eventually.be.fulfilled
})
tap.start()
tap.start();