[functional testing] Add fixture

This commit is contained in:
Jonathan Budzenski 2015-09-08 13:24:16 -05:00
parent d7db845b58
commit 32d199efce
2 changed files with 7 additions and 1 deletions

View file

@ -19,7 +19,7 @@ module.exports = function (grunt) {
fs.createReadStream(path.join(FIXTURES_PATH, file))
.pipe(request.post(`${config.server}/_bulk`, function (err, res, body) {
if (err || res.statusCode !== 200) grunt.fail.warn(err || body);
grunt.log.write(`[${colors.green('success')}] ${file}`);
grunt.log.writeln(`[${colors.green('success')}] ${file}`);
if (++doneProcessing === files.length) done();
}));
});

6
test/fixtures/test.json vendored Normal file
View file

@ -0,0 +1,6 @@
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "2" } }
{ "field1" : "value2" }
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "3" } }
{ "field1" : "value3" }