Skip to content

Commit

Permalink
using ycb module now, and support for base descriptor file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranav Verma committed Jan 11, 2013
1 parent 4b44a47 commit d47a24a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 471 deletions.
1 change: 1 addition & 0 deletions config/descriptor-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"properties" : {
"name" : { "type" : "string", "required" :true },
"commonlib" : { "type" : "string"},
"extends" : { "type" : "string"},
"startProxyServer" : { "type" : "boolean"},
"routerProxyConfig" : { "type" : "string"},
"config" : {
Expand Down
9 changes: 8 additions & 1 deletion lib/util/dataprovider.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var os = require('os');
var fs = require("fs");
var qs = require('querystring');
var JSV = require("JSV").JSV;
var ycb = require('../util/ycb');
var ycb = require('ycb');

function DataProvider(config, testDataPath) {
this.logger = log4js.getLogger("DataProvider");
Expand Down Expand Up @@ -47,6 +47,13 @@ DataProvider.prototype.getTestData = function () {
}
}

//checking if descriptor is extending another json
console.log(descriptorJson)
if ( descriptorJson[0].extends ) {
baseJson = JSON.parse(fs.readFileSync(descriptorJson[0].extends));
descriptorJson = descriptorJson.concat(baseJson);
}

// merge dimension into descriptor
dimensionsJson = JSON.parse(fs.readFileSync(this.dimensions, "utf-8"));
descriptorJson.unshift(dimensionsJson[0]);
Expand Down
Loading

0 comments on commit d47a24a

Please sign in to comment.