Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
Signed-off-by: SamYuan1990 <yy19902439@126.com>
  • Loading branch information
SamYuan1990 committed Jan 18, 2021
1 parent b1dd809 commit 059b4b2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 29 deletions.
9 changes: 6 additions & 3 deletions app.js
Expand Up @@ -15,12 +15,15 @@ const newUIRouter = require('./routes/newUI');
const app = express();
const log4js = require('log4js');

log4js.configure({
/*log4js.configure({
appenders: {app: {type: 'file', filename: 'logger.log'}},
categories: {default: {appenders: ['app'], level: 'info'}}
});
});*/

const logger = log4js.getLogger('app');
const logger = log4js.getLogger();
logger.level = "debug";
//logger.debug("Some debug messages");
//const logger = log4js.getLogger('app');
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.engine('html', ejs.__express);
Expand Down
41 changes: 15 additions & 26 deletions e2e/app.test.js
Expand Up @@ -13,22 +13,6 @@ describe('# test app.js', function () {
.expect(200, done);
});

it('GET /api/run', function (done) {
request.post('/api/run').set('Content-Type', 'application/x-www-form-urlencoded').send(
{
Path: './fabric-samples/test-network/',
BatchTimeout:'1',
MaxMessageCount:'10',
AbsoluteMaxBytes:'3',
PreferredMaxBytes:'4',
CoolDown:'5',
PrepareCLI:'./prepareConfig.sh',
StartCLI:'./network.sh',
CCDeployCLI:'./network.sh',
TapeCount: '500',
ShutDownCLI: './network.sh'
}).expect(200, done);
});
it('GET /api/getBatchTimeout', function (done) {
request
.get('/api/get?data=BatchTimeout')
Expand Down Expand Up @@ -74,15 +58,20 @@ describe('# test app.js', function () {
.get('/result/PreferredMaxBytes')
.expect(200, done);
});
/* it('GET /quick/BatchTimeout', function (done) {
request
.get('/quick/BatchTimeout')
.expect(200, done);
it('GET /api/run', function (done) {
request.post('/api/run').set('Content-Type', 'application/x-www-form-urlencoded').send(
{
Path: './fabric-samples/test-network/',
BatchTimeout:'1',
MaxMessageCount:'10',
AbsoluteMaxBytes:'3',
PreferredMaxBytes:'4',
CoolDown:'5',
PrepareCLI:'./prepareConfig.sh',
StartCLI:'./network.sh',
CCDeployCLI:'./network.sh',
TapeCount: '500',
ShutDownCLI: './network.sh'
}).expect(200, done);
});
it('GET /quick/MaxMessageCount', function (done) {
request
.get('/quick/MaxMessageCount')
.expect(200, done);
});*/
});

0 comments on commit 059b4b2

Please sign in to comment.