Skip to content

Commit ecc82e5

Browse files
committed
[#371] Add ConfigurationBuilder for flexible config management
1 parent 205181a commit ecc82e5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/instrumentation/module/http.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ test('http error status code', (t) => {
8383
const pAcceptEvent = pSpan.getAcceptevent()
8484
t.equal(pAcceptEvent.getRpc(), '/', 'rpc should be /')
8585
t.equal(pAcceptEvent.getEndpoint(), actualSpan.endPoint, `endpoint should be ${actualSpan.endPoint}`)
86-
t.equal(pAcceptEvent.getRemoteaddr(), '::1', 'remoteAddr should be ::1')
86+
t.equal(pAcceptEvent.getRemoteaddr(), actualSpan.remoteAddress, `remoteAddress should be ${actualSpan.remoteAddress}`)
8787

8888
t.equal(pSpan.getFlag(), 0, 'flag should be 0')
8989
t.equal(pSpan.getErr(), 1, 'error should be 1')

test/instrumentation/module/undici.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ test('shimming require(undici) cause by require-in-the-middle package', function
5656
const actualOutgoingRequestAcceptEvent = actualOutgoingRequestSpan.getAcceptevent()
5757
t.equal(actualOutgoingRequestAcceptEvent.getRpc(), '/outgoing', 'Outgoing request Span rpc is /outgoing')
5858
t.equal(actualOutgoingRequestAcceptEvent.getEndpoint(), 'localhost:5006', 'Outgoing request Span endpoint is localhost:5006')
59-
t.equal(actualOutgoingRequestAcceptEvent.getRemoteaddr(), '::1', 'Outgoing request Span remote address is ::1')
59+
t.equal(actualOutgoingRequestAcceptEvent.getRemoteaddr(), actualTestSpan.remoteAddress, `Outgoing request Span remote address is ${actualTestSpan.remoteAddress}`)
6060

6161
t.equal(actualOutgoingRequestSpan.getFlag(), 0, 'Outgoing request Span flag is 0')
6262
t.equal(actualOutgoingRequestSpan.getErr(), 1, 'Outgoing request Span error is 1')
@@ -159,7 +159,7 @@ test('shimming require(undici) cause by require-in-the-middle package', function
159159
const actualAcceptEvent = actualPSpan.getAcceptevent()
160160
t.equal(actualAcceptEvent.getRpc(), '/test', 'rpc is /outgoing')
161161
t.equal(actualAcceptEvent.getEndpoint(), 'localhost:5006', 'endpoint is localhost:5006')
162-
t.equal(actualAcceptEvent.getRemoteaddr(), '::1', 'remote address is ::1')
162+
t.equal(actualAcceptEvent.getRemoteaddr(), actualTestSpan.remoteAddress, `remote address is ${actualTestSpan.remoteAddress}`)
163163

164164
t.equal(actualPSpan.getFlag(), 0, 'flag is 0')
165165
t.equal(actualPSpan.getErr(), 0, 'error is 0')
@@ -286,7 +286,7 @@ test('shimming udici by global nodejs fetch', function (t) {
286286
const actualOutgoingRequestAcceptEvent = actualOutgoingRequestSpan.getAcceptevent()
287287
t.equal(actualOutgoingRequestAcceptEvent.getRpc(), '/outgoing', 'Outgoing request Span rpc is /outgoing')
288288
t.equal(actualOutgoingRequestAcceptEvent.getEndpoint(), 'localhost:5006', 'Outgoing request Span endpoint is localhost:5006')
289-
t.equal(actualOutgoingRequestAcceptEvent.getRemoteaddr(), '::1', 'Outgoing request Span remote address is ::1')
289+
t.equal(actualOutgoingRequestAcceptEvent.getRemoteaddr(), actualTestSpan.remoteAddress, `Outgoing request Span remote address is ${actualTestSpan.remoteAddress}`)
290290

291291
t.equal(actualOutgoingRequestSpan.getFlag(), 0, 'Outgoing request Span flag is 0')
292292
t.equal(actualOutgoingRequestSpan.getErr(), 0, 'Outgoing request Span error is 0')
@@ -384,7 +384,7 @@ test('shimming udici by global nodejs fetch', function (t) {
384384
const actualAcceptEvent = actualPSpan.getAcceptevent()
385385
t.equal(actualAcceptEvent.getRpc(), '/test', 'rpc is /outgoing')
386386
t.equal(actualAcceptEvent.getEndpoint(), 'localhost:5006', 'endpoint is localhost:5006')
387-
t.equal(actualAcceptEvent.getRemoteaddr(), '::1', 'remote address is ::1')
387+
t.equal(actualAcceptEvent.getRemoteaddr(), actualTestSpan.remoteAddress, `remote address is ${actualTestSpan.remoteAddress}`)
388388

389389
t.equal(actualPSpan.getFlag(), 0, 'flag is 0')
390390
t.equal(actualPSpan.getErr(), 0, 'error is 0')

0 commit comments

Comments
 (0)