update test Environment

This commit is contained in:
Philipp Kunz 2016-06-16 01:56:53 +02:00
parent 7049ddc5f2
commit 38dca0c9a0
14 changed files with 162 additions and 92 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
import "typings-global";
export declare class dockersock {
export declare class Dockersock {
sockPath: string;
constructor(pathArg?: string);
listContainers(): any;

87
dist/dockersock.classes.dockersock.js vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/index.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
import "typings-global";
export { Dockersock } from "./dockersock.classes.dockersock";

6
dist/index.js vendored Normal file
View File

@ -0,0 +1,6 @@
"use strict";
require("typings-global");
var dockersock_classes_dockersock_1 = require("./dockersock.classes.dockersock");
exports.Dockersock = dockersock_classes_dockersock_1.Dockersock;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsOENBQXlCLGlDQUFpQyxDQUFDO0FBQW5ELGdFQUFrRCIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCI7XG5leHBvcnQge0RvY2tlcnNvY2t9IGZyb20gXCIuL2RvY2tlcnNvY2suY2xhc3Nlcy5kb2NrZXJzb2NrXCIiXX0=

22
docker-compose.yml Normal file
View File

@ -0,0 +1,22 @@
nginx1 :
image: "nginx"
environment:
VIRTUAL_HOST: "test100.labkomp.de"
restart: always
container_name: nginx1
nginx2:
image: nginx
environment:
VIRTUAL_HOST: "test101.labkomp.de"
restart: always
container_name: nginx2
dockersock:
image: "trafficimg"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
env_file: "nogit/nogit.env"
restart: always
container_name: dockersock-container

View File

@ -1,3 +1,4 @@
{
"mode":"default"
"mode":"default",
"coverageTreshold":10
}

View File

@ -5,7 +5,7 @@
"main": "dist/index.js",
"scripts": {
"test": "npmts",
"testindocker": "npmts && docker-machine start default; eval \"$(docker-machine env default)\" && docker build -t test-image . && docker run test-image"
"testindocker": "bash -x ./test/testEnv.sh"
},
"repository": {
"type": "git",
@ -31,6 +31,8 @@
"typings-global": "^1.0.3"
},
"devDependencies": {
"npmts-g": "^5.2.6"
"npmts-g": "^5.2.6",
"should": "^9.0.2",
"typings-test": "^1.0.1"
}
}

2
test/test.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
import "typings-test";
import "should";

15
test/test.js Normal file
View File

@ -0,0 +1,15 @@
"use strict";
require("typings-test");
require("should");
var index_1 = require("../dist/index");
describe("dockersock", function () {
describe(".Dockersock()", function () {
var testDockersock;
it("should create a new Dockersock instance", function () {
testDockersock = new index_1.Dockersock();
testDockersock.should.be.instanceof(index_1.Dockersock);
});
});
});
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsUUFBTyxRQUVQLENBQUMsQ0FGYztBQUVmLHNCQUF5QixlQUV6QixDQUFDLENBRnVDO0FBRXhDLFFBQVEsQ0FBQyxZQUFZLEVBQUM7SUFDbEIsUUFBUSxDQUFDLGVBQWUsRUFBQztRQUNyQixJQUFJLGNBQXlCLENBQUM7UUFDOUIsRUFBRSxDQUFDLHlDQUF5QyxFQUFDO1lBQ3pDLGNBQWMsR0FBRyxJQUFJLGtCQUFVLEVBQUUsQ0FBQztZQUNsQyxjQUFjLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxVQUFVLENBQUMsa0JBQVUsQ0FBQyxDQUFDO1FBQ3BELENBQUMsQ0FBQyxDQUFDO0lBQ1AsQ0FBQyxDQUFDLENBQUM7QUFDUCxDQUFDLENBQUMsQ0FBQyIsImZpbGUiOiJ0ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy10ZXN0XCI7XG5pbXBvcnQgXCJzaG91bGRcIlxuXG5pbXBvcnQge0RvY2tlcnNvY2t9IGZyb20gXCIuLi9kaXN0L2luZGV4XCJcblxuZGVzY3JpYmUoXCJkb2NrZXJzb2NrXCIsZnVuY3Rpb24oKXtcbiAgICBkZXNjcmliZShcIi5Eb2NrZXJzb2NrKClcIixmdW5jdGlvbigpe1xuICAgICAgICBsZXQgdGVzdERvY2tlcnNvY2s6RG9ja2Vyc29jaztcbiAgICAgICAgaXQoXCJzaG91bGQgY3JlYXRlIGEgbmV3IERvY2tlcnNvY2sgaW5zdGFuY2VcIixmdW5jdGlvbigpe1xuICAgICAgICAgICAgdGVzdERvY2tlcnNvY2sgPSBuZXcgRG9ja2Vyc29jaygpO1xuICAgICAgICAgICAgdGVzdERvY2tlcnNvY2suc2hvdWxkLmJlLmluc3RhbmNlb2YoRG9ja2Vyc29jayk7XG4gICAgICAgIH0pO1xuICAgIH0pO1xufSk7Il19

14
test/test.ts Normal file
View File

@ -0,0 +1,14 @@
import "typings-test";
import "should"
import {Dockersock} from "../dist/index"
describe("dockersock",function(){
describe(".Dockersock()",function(){
let testDockersock:Dockersock;
it("should create a new Dockersock instance",function(){
testDockersock = new Dockersock();
testDockersock.should.be.instanceof(Dockersock);
});
});
});

4
test/testEnv.sh Normal file
View File

@ -0,0 +1,4 @@
npmts
docker-machine start default; eval \"$(docker-machine env default)\"
docker build -t dockersock-image .
docker-compose up

View File

@ -1,7 +1,7 @@
import "typings-global"
import * as plugins from "./dockersock.plugins";
export class dockersock {
export class Dockersock {
sockPath:string;
constructor(pathArg:string = "http://unix:/var/run/docker.sock:"){
this.sockPath = pathArg;

2
ts/index.ts Normal file
View File

@ -0,0 +1,2 @@
import "typings-global";
export {Dockersock} from "./dockersock.classes.dockersock"