From a3622d10f22b60396dcc68888c1239022914ec62 Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Wed, 2 Oct 2019 14:23:53 -0700 Subject: [PATCH] test: relax a property check in system tests (#1133) --- system-test/trace-express.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-test/trace-express.js b/system-test/trace-express.js index 5be9ec4b9..e21269d73 100644 --- a/system-test/trace-express.js +++ b/system-test/trace-express.js @@ -144,9 +144,9 @@ describe('express + datastore', () => { 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 => { - const datastoreUrl = `https://datastore.googleapis.com/${EXPECTED_ENDPOINT}`; + const urlLabelValue = span.labels[tracer.labels.HTTP_URL_LABEL_KEY]; return span.name === `grpc:/${EXPECTED_ENDPOINT}` || - span.labels[tracer.labels.HTTP_URL_LABEL_KEY] === datastoreUrl; + (urlLabelValue && urlLabelValue.endsWith(EXPECTED_ENDPOINT)); }); assert.strictEqual(parent.name, testPath, 'should match unique path');