зеркало из https://github.com/mozilla/fleet.git
23 строки
431 B
JavaScript
23 строки
431 B
JavaScript
import nock from 'nock';
|
|
|
|
const defaultParams = {
|
|
query: '',
|
|
selected: {
|
|
hosts: [],
|
|
labels: [],
|
|
},
|
|
};
|
|
const defaultResponse = {
|
|
targets: {
|
|
hosts: [],
|
|
labels: [],
|
|
},
|
|
};
|
|
|
|
|
|
export default (params = defaultParams, response = defaultResponse, responseStatus = 200) => {
|
|
return nock('http://localhost:8080')
|
|
.post('/api/v1/kolide/targets', JSON.stringify(params))
|
|
.reply(responseStatus, response);
|
|
};
|