docker-mock
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -20,2 +20,8 @@ var _ = require('lodash'); | ||
/** | ||
* This GET is to retrieve the Docker Log stream from the container | ||
*/ | ||
app.get('/containers/:id/logs', | ||
mw.respondLogStream(204)); | ||
app.get('/containers/:id/top', mw.notYetImplemented); | ||
@@ -22,0 +28,0 @@ |
@@ -7,2 +7,4 @@ var _ = require('lodash'); | ||
var series = require('middleware-flow').series; | ||
var testFile = './test.txt'; | ||
var fs = require('fs'); | ||
@@ -253,3 +255,3 @@ module.exports = { | ||
'Id': container.Id, | ||
'Image': container.Image, | ||
'Image': container.Image | ||
// TODO: extend with other data we may want | ||
@@ -260,9 +262,17 @@ }; | ||
}, | ||
respondLogStream: function () { | ||
return function (req, res, next) { | ||
fs.writeFileSync(testFile, 'Just a bunch of text'); | ||
var stream = fs.createReadStream(testFile); | ||
stream.pipe(res); | ||
fs.unlinkSync(testFile); | ||
}; | ||
}, | ||
getInfo: function (containers, images) { | ||
return function (req, res, next) { | ||
res.json({ | ||
'Containers': _.size(containers), | ||
'Images': _.size(images), | ||
'Mock': true, | ||
// TODO: any other information we need? | ||
'Containers': _.size(containers), | ||
'Images': _.size(images), | ||
'Mock': true | ||
// TODO: any other information we need? | ||
}); | ||
@@ -269,0 +279,0 @@ }; |
{ | ||
"name": "docker-mock", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Mock for Docker", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
# docker-mock | ||
# tony is cool and so is sundip | ||
@@ -4,0 +3,0 @@ [![Build Status](https://travis-ci.org/Runnable/docker-mock.svg?branch=master)](https://travis-ci.org/Runnable/docker-mock) [![Dependency Status](https://david-dm.org/Runnable/docker-mock.svg)](https://david-dm.org/Runnable/docker-mock) [![devDependency Status](https://david-dm.org/Runnable/docker-mock/dev-status.svg)](https://david-dm.org/Runnable/docker-mock#info=devDependencies) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 6 instances in 1 package
819
0
30534
8
54
1