consolidate naming and start exporting interfaces

This commit is contained in:
2016-08-02 15:32:06 +02:00
parent d8a4c3d088
commit c3c2ab776d
23 changed files with 221 additions and 185 deletions

View File

@ -12,17 +12,17 @@ describe("smartnginx", function () {
let testNginxZone02;
describe("NginxZone", function () {
it(`"new NginxZone()" should produce an instance of NginxConfig`, function () {
testNginxZone01 = new smartnginx.NginxZone({
zoneName: "test100.bleu.de",
type: smartnginx.zoneTypes.reverseProxy,
testNginxZone01 = new smartnginx.NginxHost({
hostName: "test100.bleu.de",
type: smartnginx.hostTypes.reverseProxy,
destination: "192.192.192.191"
});
testNginxZone02 = new smartnginx.NginxZone({
zoneName: "test102.bleu.de",
type: smartnginx.zoneTypes.reverseProxy,
testNginxZone02 = new smartnginx.NginxHost({
hostName: "test102.bleu.de",
type: smartnginx.hostTypes.reverseProxy,
destination: "192.192.192.192"
});
testNginxZone01.should.be.instanceof(smartnginx.NginxZone);
testNginxZone01.should.be.instanceof(smartnginx.NginxHost);
console.log(testNginxZone01.configString);
});
});
@ -38,8 +38,8 @@ describe("smartnginx", function () {
});
describe(".addZone()", function () {
it("should add a zone to NginxConfig Object", function () {
testNginxConfig.addZone(testNginxZone01);
testNginxConfig.addZone(testNginxZone02);
testNginxConfig.addHost(testNginxZone01);
testNginxConfig.addHost(testNginxZone02);
});
});
describe(".deploy()", function () {

View File

@ -8,21 +8,21 @@ import * as smartnginx from "../dist/index";
let testQenv = new Qenv(process.cwd(),path.join(process.cwd(),".nogit"));
describe("smartnginx",function(){
let testNginxConfig:smartnginx.NginxConfig;
let testNginxZone01:smartnginx.NginxZone;
let testNginxZone02:smartnginx.NginxZone;
let testNginxZone01:smartnginx.NginxHost;
let testNginxZone02:smartnginx.NginxHost;
describe("NginxZone",function(){
it(`"new NginxZone()" should produce an instance of NginxConfig`,function(){
testNginxZone01 = new smartnginx.NginxZone({
zoneName:"test100.bleu.de",
type:smartnginx.zoneTypes.reverseProxy,
testNginxZone01 = new smartnginx.NginxHost({
hostName:"test100.bleu.de",
type:smartnginx.hostTypes.reverseProxy,
destination:"192.192.192.191"
});
testNginxZone02 = new smartnginx.NginxZone({
zoneName:"test102.bleu.de",
type:smartnginx.zoneTypes.reverseProxy,
testNginxZone02 = new smartnginx.NginxHost({
hostName:"test102.bleu.de",
type:smartnginx.hostTypes.reverseProxy,
destination:"192.192.192.192"
});
testNginxZone01.should.be.instanceof(smartnginx.NginxZone);
testNginxZone01.should.be.instanceof(smartnginx.NginxHost);
console.log(testNginxZone01.configString);
});
});
@ -38,8 +38,8 @@ describe("smartnginx",function(){
});
describe(".addZone()",function(){
it("should add a zone to NginxConfig Object",function(){
testNginxConfig.addZone(testNginxZone01);
testNginxConfig.addZone(testNginxZone02);
testNginxConfig.addHost(testNginxZone01);
testNginxConfig.addHost(testNginxZone02);
})
});
describe(".deploy()",function(){