Skip to content

Commit

Permalink
simplified results
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter McIntyre committed Mar 2, 2017
1 parent d248ee4 commit 300b664
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ var search = function (query, p) {
if (err) return reject(err);

// success
return resolve({job:job,results:results});
return resolve({job:job,results: mapToJson(results)});
});
},
failed: function(job) {
Expand All @@ -140,5 +140,11 @@ var exports = module.exports = {
toJson: mapToJson,
owner: owner,
app: app,
sharing: sharing
sharing: sharing,
params: params,
exec_mode: exec_mode,
output_mode: output_mode,
earliest_time: earliest_time,
latest_time: latest_time,
namespace: namespace
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "splunk-tester",
"version": "1.2.0",
"version": "1.3.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
3 changes: 0 additions & 3 deletions test/test-splunk.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ describe('Basic searching', function() {
var properties = output.job.properties();
var results = output.results;

// map results
results = splunktester.toJson(results);

// assert
expect(properties.runDuration).to.be.below(5);
expect(properties.resultCount).to.equal(options.limit);
Expand Down

0 comments on commit 300b664

Please sign in to comment.