-
Notifications
You must be signed in to change notification settings - Fork 83
Bulkmode support #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shouryataneja
wants to merge
10
commits into
winstonjs:master
Choose a base branch
from
shouryataneja:bulkmode-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bulkmode support #55
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4ef3855
added support for Bulk Mode and Created Mock test Cases
shouryataneja ba24bf4
remove encrypted config file
shouryataneja 7becdb8
Added support for bulk mode
shouryataneja 43b3483
Update README.md
shouryataneja 775f784
Update README.md
shouryataneja 3c3a216
removed unwanted files
shouryataneja 7f33bc6
Updated repetition
shouryataneja 0c86934
Added info to run mock test cases
shouryataneja 7aaae0b
removed config.json from .gitignore
shouryataneja 99878ab
Merge branch 'bulkmode-support' of https://github.com/shouryataneja/n…
shouryataneja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,15 +8,9 @@ node_js: | |
| before_install: | ||
| - travis_retry npm install -g [email protected] | ||
| - travis_retry npm install --loglevel=http | ||
| - > | ||
| openssl aes-256-cbc \ | ||
| -K $encrypted_4fb8e306b739_key \ | ||
| -iv $encrypted_4fb8e306b739_iv \ | ||
| -in test/config.json.enc \ | ||
| -out test/config.json -d | ||
|
|
||
| script: | ||
| - npm test | ||
| - npm run test-as-mock | ||
|
|
||
| matrix: | ||
| allow_failures: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* | ||
| * common-test.js: Tests for Loggly `common` utility module | ||
| * | ||
| * (C) 2010 Charlie Robbins | ||
| * MIT LICENSE | ||
| * | ||
| */ | ||
|
|
||
| var path = require('path'), | ||
| vows = require('vows'), | ||
| assert = require('assert'), | ||
| common = require('../lib/loggly/common'); | ||
|
|
||
| vows.describe('node-loggly/common').addBatch({ | ||
| "When using the common module": { | ||
| "the clone() method": { | ||
| topic: function () { | ||
| this.obj = { | ||
| name: 'common', | ||
| deep: { | ||
| first: 'first', | ||
| second: 'second' | ||
| } | ||
| }; | ||
| return common.clone(this.obj); | ||
| }, | ||
| "should return a deep clone of the object": function (clone) { | ||
| assert.isFalse(this.obj.deep === clone.deep); | ||
| } | ||
| } | ||
| } | ||
| }).export(module); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "token": "test", | ||
| "subdomain": "testSubdomain", | ||
| "auth": { | ||
| "username": "test", | ||
| "password": "test" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * search-test.js: Tests for Loggly search requests | ||
| * | ||
| * (C) 2010 Charlie Robbins | ||
| * MIT LICENSE | ||
| * | ||
| */ | ||
| var path = require('path'), | ||
| vows = require('vows'), | ||
| assert = require('assert'), | ||
| nock = require('nock'), | ||
| helpers = require('./helpers'); | ||
|
|
||
| var options = {}, | ||
| testContext = {}, | ||
| config = helpers.loadConfig(), | ||
| loggly = require('../lib/loggly').createClient(config); | ||
|
|
||
| vows.describe('node-loggly/customer').addBatch({ | ||
| "When using the node-loggly client": { | ||
| "the customer() method": { | ||
| topic: function() { | ||
| nock("https://" + config.subdomain + ".loggly.com") | ||
| .get('/apiv2/customer') | ||
| .reply(200, { | ||
| "tokens": ["test", "test2"], | ||
| "subdomain": config.subdomain, | ||
| "subscription": { | ||
| "key1": "value1" | ||
| } | ||
| }); | ||
| loggly.customer(this.callback); | ||
|
|
||
| }, | ||
| "should return a valid customer": function(err, customer) { | ||
| assert.isNull(err); | ||
| assert.isArray(customer.tokens); | ||
| assert.isString(customer.subdomain); | ||
| assert.isObject(customer.subscription); | ||
| } | ||
| } | ||
| } | ||
| }).export(module); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| * helpers.js: Test helpers for node-loggly | ||
| * | ||
| * (C) 2010 Charlie Robbins | ||
| * MIT LICENSE | ||
| * | ||
| */ | ||
|
|
||
| var fs = require('fs'), | ||
| util = require('util'), | ||
| path = require('path'), | ||
| vows = require('vows'), | ||
| assert = require('assert'), | ||
| loggly = require('../lib/loggly'); | ||
|
|
||
| var helpers = exports; | ||
|
|
||
| helpers.validConfig = function (config) { | ||
| return config | ||
| && config.subdomain !== 'test-subdomain' | ||
| && config.auth | ||
| && config.auth.username !== 'test-username' | ||
| && config.auth.password !== 'test-password' | ||
| && config.token; | ||
| }; | ||
|
|
||
| helpers.loadConfig = function () { | ||
| try { | ||
| var config = require('./config'); | ||
| if (!helpers.validConfig(config)) { | ||
| throw new Error(util.format('test/config.json: invalid data %j', config)); | ||
| } | ||
|
|
||
| helpers.config = config || {}; | ||
| return helpers.config; | ||
| } | ||
| catch (ex) { | ||
| console.log('Error parsing test/config.json'); | ||
| throw ex; | ||
| } | ||
| }; | ||
|
|
||
| helpers.assertSearch = function (err, results) { | ||
| assert.isNull(err); | ||
| assert.isObject(results); | ||
| assert.isArray(results.events); | ||
| assert.isTrue(typeof results.total_events !== 'undefined'); | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this. It is already in
devDependencies.