Skip to content

Commit

Permalink
Merge branch 'develop' into snyk-fix-0f1c519328b7215f7772ef7dec88ba98
Browse files Browse the repository at this point in the history
  • Loading branch information
devsatishm authored May 12, 2020
2 parents 93f6473 + 53d2f92 commit 65ec5ea
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
- PLATFORM_SERVICE=core/jazz_email
- PLATFORM_SERVICE=core/jazz_environment-event-handler
- PLATFORM_SERVICE=core/jazz_environments
- PLATFORM_SERVICE=core/jazz_es-kinesis-log-streamer
- PLATFORM_SERVICE=core/jazz_events
- PLATFORM_SERVICE=core/jazz_events-handler
- PLATFORM_SERVICE=core/jazz_is-service-available
Expand Down
4 changes: 2 additions & 2 deletions core/jazz_assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lodash": "*",
"moment": "*",
"request": "*",
"uuid": "*"
"uuid": "^3.3.2"
},
"devDependencies": {
"aws-lambda-mock-context": "^3.1.1",
Expand All @@ -28,4 +28,4 @@
"mocha": "^v3.0.0",
"sinon": "^5.0.10"
}
}
}
4 changes: 2 additions & 2 deletions core/jazz_codeq/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ describe('validation tests', () => {
});

it('should return null when from date is invalid', () => {
const validFrom = validation.validateFromDate(1234);
const validFrom = validation.validateFromDate('BAD 123 - 1date');

expect(validFrom).to.eql(null);
});
Expand All @@ -351,7 +351,7 @@ describe('validation tests', () => {
});

it('should return null when to date is invalid', () => {
const validFrom = validation.validateToDate(1234);
const validFrom = validation.validateToDate('BAD 123 - 1date');

expect(validFrom).to.eql(null);
});
Expand Down
4 changes: 2 additions & 2 deletions core/jazz_deployments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lodash": "*",
"moment": "*",
"request": "*",
"uuid": "*"
"uuid": "^3.3.2"
},
"devDependencies": {
"aws-lambda-mock-context": "^3.1.1",
Expand All @@ -26,4 +26,4 @@
"mocha": "^v3.0.0",
"sinon": "^5.0.7"
}
}
}
4 changes: 2 additions & 2 deletions core/jazz_es-kinesis-log-streamer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"unicode-byte-truncate": "*",
"request": "*",
"uuid": "*"
"uuid": "^3.3.2"
},
"devDependencies": {
"aws-lambda-mock-context": "^3.2.1",
Expand All @@ -24,4 +24,4 @@
"nyc": "^13.3.0",
"mocha": "^v3.0.0"
}
}
}
8 changes: 4 additions & 4 deletions core/jazz_es-kinesis-log-streamer/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ describe('jazz_es-kinesis-log-stream', function () {
let payload, expected, response, request, data;
beforeEach(function () {
payload = {
"host": config.ES_ENDPOINT,
"url": 'https://' + config.ES_ENDPOINT + '/_bulk',
"method": "POST",
"path": "/_bulk",
"body": "Sample data",
"headers": {
"Content-Type": "application/json",
Expand Down Expand Up @@ -221,11 +220,12 @@ describe('jazz_es-kinesis-log-stream', function () {
response.write(JSON.stringify(expected));
response.end();

let buildRequest = sinon.stub(utils, "buildRequest").returns(payload);
this.request = sinon.stub(https, 'request');
this.request.callsArgWith(1, response)
.returns(request);

let buildRequest = sinon.stub(utils, "buildRequest").returns(payload);

index.post(config, "hello world", (error, success, response, failedItems) => {

expect(error).to.have.all.keys('statusCode', 'responseBody');
Expand Down Expand Up @@ -418,7 +418,7 @@ describe('jazz_es-kinesis-log-stream', function () {
describe('buildRequest', () => {
it('should successfully return build request payload', () => {
let res = utils.buildRequest(config.ES_ENDPOINT, "sample text");
expect(res).to.have.all.keys('host', 'method', 'path', 'body', 'headers');
expect(res).to.have.all.keys('url', 'method', 'body', 'headers');
})
})

Expand Down
4 changes: 2 additions & 2 deletions core/jazz_events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"moment": "*",
"request": "*",
"uuid": "*"
"uuid": "^3.3.2"
},
"devDependencies": {
"chai": "^3.5.0",
Expand All @@ -27,4 +27,4 @@
"lambda-local": "^1.4.2",
"sinon": "^1.17.7"
}
}
}

0 comments on commit 65ec5ea

Please sign in to comment.