Skip to content

Commit

Permalink
fix(deps): update dependency @google-cloud/datastore to v4 (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and kjin committed May 16, 2019
1 parent b37aa3d commit c63bb14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion system-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trace-agent-system-test",
"version": "1.0.0",
"dependencies": {
"@google-cloud/datastore": "^3.0.0",
"@google-cloud/datastore": "^4.0.0",
"express": "^4.16.3",
"google-auto-auth": "^0.10.0",
"got": "^8.0.0",
Expand Down
10 changes: 7 additions & 3 deletions system-test/trace-express.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ if (!process.env.GCLOUD_PROJECT ||
const WRITE_CONSISTENCY_DELAY_MS = 20 * 1000;
const projectId = process.env.GCLOUD_PROJECT;
const keyFilename = process.env.GOOGLE_APPLICATION_CREDENTIALS;
const EXPECTED_ENDPOINT = 'google.datastore.v1.Datastore/RunQuery';

// trace-agent must be loaded before everything else.
require('../').start({
const tracer = require('../').start({
projectId: projectId,
keyFilename: keyFilename,
flushDelaySeconds: 1
Expand Down Expand Up @@ -142,8 +143,11 @@ describe('express + datastore', () => {
const trace = traces[0];
assert.ok(trace.spans.length >= 2, 'should be at least 2 spans: parent, child');
const parent = trace.spans[0];
const child = trace.spans.find(span =>
span.name === 'grpc:/google.datastore.v1.Datastore/RunQuery');
const child = trace.spans.find(span => {
const datastoreUrl = `https://datastore.googleapis.com/${EXPECTED_ENDPOINT}`;
return span.name === `grpc:/${EXPECTED_ENDPOINT}` ||
span.labels[tracer.labels.HTTP_URL_LABEL_KEY] === datastoreUrl;
});

assert.strictEqual(parent.name, testPath, 'should match unique path');
assert.ok(child);
Expand Down

0 comments on commit c63bb14

Please sign in to comment.