now working with npmdocker and the npmts 7.x.x

This commit is contained in:
2017-04-02 15:30:43 +02:00
parent 499c6cc3b7
commit a77ed42e9f
7 changed files with 60 additions and 20 deletions

View File

@ -1,6 +1,6 @@
import "typings-global";
import { expect, tap } from 'tapbundle'
import * as observableToPromise from 'observable-to-promise'
import { Dockersock } from "../dist/index";
let testDockersock: Dockersock;
@ -8,27 +8,29 @@ let testDockersock: Dockersock;
tap.test("should create a new Dockersock instance", async () => {
testDockersock = new Dockersock();
return expect(testDockersock).to.be.instanceof(Dockersock);
});
}).catch(tap.threw);
tap.test("should list containers", async () => {
await testDockersock.listContainers()
.then(async (dataArg) => {
console.log(dataArg);
});
});
}).catch(tap.threw);
tap.test("should list detailed containers", async () => {
await testDockersock.listContainersDetailed()
.then(async (dataArg) => {
console.log(dataArg);
});
});
}).catch(tap.threw);
tap.test("should pull an image from imagetag", async () => {
await testDockersock.pullImage("hosttoday/ht-docker-dbase")
});
await testDockersock.pullImage("hosttoday/ht-docker-node:npmci")
}).catch(tap.threw);
tap.test("should return a change Objservable", async () => {
testDockersock.getChangeObservable();
/*tap.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
}).catch(tap.threw);*/