mirror of
https://github.com/mmumshad/ansible-playable.git
synced 2025-03-09 23:38:54 +00:00
Feature - Integrate System API to view logs in UI
This commit is contained in:
parent
1690470269
commit
bf6c8743c5
15 changed files with 353 additions and 26 deletions
57
server/api/system/system.integration.js
Normal file
57
server/api/system/system.integration.js
Normal file
|
@ -0,0 +1,57 @@
|
|||
'use strict';
|
||||
|
||||
/* globals describe, expect, it, beforeEach, afterEach */
|
||||
|
||||
var app = require('../..');
|
||||
import request from 'supertest';
|
||||
|
||||
var newSystem;
|
||||
|
||||
describe('System API:', function() {
|
||||
describe('GET /api/system/logs/server', function() {
|
||||
var systems;
|
||||
|
||||
beforeEach(function(done) {
|
||||
request(app)
|
||||
.get('/api/system/logs/server')
|
||||
.expect(200)
|
||||
//.expect('Content-Type', /json/)
|
||||
.end((err, res) => {
|
||||
if(err) {
|
||||
return done(err);
|
||||
}
|
||||
systems = res.text;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should respond with String containing "Express server listening"', function() {
|
||||
expect(systems).to.contain('Express server listening');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('GET /api/system/logs/api', function() {
|
||||
var systems;
|
||||
|
||||
beforeEach(function(done) {
|
||||
request(app)
|
||||
.get('/api/system/logs/api')
|
||||
.expect(200)
|
||||
//.expect('Content-Type', /json/)
|
||||
.end((err, res) => {
|
||||
if(err) {
|
||||
return done(err);
|
||||
}
|
||||
console.log(JSON.stringify(res));
|
||||
systems = res.text;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should respond with String', function() {
|
||||
expect(systems).to.contain('/api/system/logs');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue