Skip to content

Commit

Permalink
GCF logging: take 2 of #1734 (#1811)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace Nassri authored May 19, 2020
1 parent ddb418c commit 3eb9d83
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions functions/log/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"test": "mocha test/*.test.js --timeout=20000"
},
"dependencies": {
"@google-cloud/logging": "^7.0.0",
"@google-cloud/monitoring": "^1.0.0"
"@google-cloud/logging": "^7.0.0"
},
"devDependencies": {
"mocha": "^7.0.0",
Expand Down
10 changes: 0 additions & 10 deletions functions/log/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,15 @@ const getSample = () => {
};
stream.on.withArgs('end').yields();

const monitoring = {
projectPath: sinon.stub(),
listTimeSeries: sinon.stub().returns(stream),
};
const logging = {
getEntries: sinon.stub().returns(Promise.resolve(results)),
};

return {
program: proxyquire('../', {
'@google-cloud/logging': sinon.stub().returns(logging),
'@google-cloud/monitoring': {
v3: sinon.stub().returns({
metricServiceApi: sinon.stub().returns(monitoring),
}),
},
}),
mocks: {
monitoring: monitoring,
logging: logging,
results: results,
},
Expand Down

0 comments on commit 3eb9d83

Please sign in to comment.