Skip to content

Commit 15e7bc5

Browse files
committed
test: corrected test
1 parent 3b7e3c6 commit 15e7bc5

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

packages/core/test/config/normalizeConfig_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ describe('config.normalizeConfig', () => {
208208
});
209209

210210
it('should parse extra headers from env var', () => {
211-
process.env.INSTANA_EXTRA_HTTP_HEADERS = ' X-Header-1 ; X-hEADer-2 , X-Whatever ';
211+
process.env.INSTANA_EXTRA_HTTP_HEADERS = ' X-Header-1 ; X-Header-2 , X-Whatever ';
212212
const config = coreConfig.normalize();
213-
expect(config.tracing.http.extraHttpHeadersToCapture).to.deep.equal(['x-header-1', 'x-header-2', 'x-whatever']);
213+
expect(config.tracing.http.extraHttpHeadersToCapture).to.deep.equal(['X-Header-1', 'X-Header-2', 'X-Whatever']);
214214
});
215215

216216
it('must use default extra headers (empty list) when INSTANA_EXTRA_HTTP_HEADERS is invalid', () => {
@@ -530,14 +530,14 @@ describe('config.normalizeConfig', () => {
530530
expect(config.tracing.disable.instrumentations).to.deep.equal(['graphql', 'grpc']);
531531
});
532532

533-
it('config should take precedence over INSTANA_TRACING_DISABLE_INSTRUMENTATIONS for config', () => {
533+
it('config should take precedence for INSTANA_TRACING_DISABLE_INSTRUMENTATIONS over config', () => {
534534
process.env.INSTANA_TRACING_DISABLE_INSTRUMENTATIONS = 'foo, bar';
535535
const config = coreConfig.normalize({
536536
tracing: {
537537
disable: { instrumentations: ['baz', 'fizz'] }
538538
}
539539
});
540-
expect(config.tracing.disable.instrumentations).to.deep.equal(['baz', 'fizz']);
540+
expect(config.tracing.disable.instrumentations).to.deep.equal(['foo', 'bar']);
541541
});
542542

543543
it('should disable multiple instrumentations via env var INSTANA_TRACING_DISABLE_INSTRUMENTATIONS', () => {
@@ -573,14 +573,14 @@ describe('config.normalizeConfig', () => {
573573
expect(config.tracing.disable.groups).to.deep.equal(['frameworks', 'databases']);
574574
});
575575

576-
it('config should take precedence over INSTANA_TRACING_DISABLE_GROUPS when disabling groups', () => {
576+
it('config should take precedence for INSTANA_TRACING_DISABLE_GROUPS when disabling groups', () => {
577577
process.env.INSTANA_TRACING_DISABLE_GROUPS = 'frameworks, databases';
578578
const config = coreConfig.normalize({
579579
tracing: {
580580
disable: { groups: ['LOGGING'] }
581581
}
582582
});
583-
expect(config.tracing.disable.groups).to.deep.equal(['logging']);
583+
expect(config.tracing.disable.groups).to.deep.equal(['frameworks', 'databases']);
584584
});
585585

586586
it('should disable instrumentations and groups when both configured', () => {

packages/core/test/tracing/index_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,14 @@ mochaSuiteFn('[UNIT] tracing/index', function () {
197197
process.env.INSTANA_TRACING_DISABLE_INSTRUMENTATIONS = 'grpc,kafkajs';
198198
initAndActivate({ tracing: { disable: { instrumentations: ['aws-sdk/v2'] } } });
199199

200-
expect(initAwsSdkv2).not.to.have.been.called;
201-
expect(activateAwsSdkv2).not.to.have.been.called;
200+
expect(initAwsSdkv2).to.have.been.called;
201+
expect(activateAwsSdkv2).to.have.been.called;
202202

203203
expect(initStubGrpcJs).to.have.been.called;
204204
expect(activateStubGrpcJs).to.have.been.called;
205205

206-
expect(initStubKafkaJs).to.have.been.called;
207-
expect(activateStubKafkaJs).to.have.been.called;
206+
expect(initStubKafkaJs).not.to.have.been.called;
207+
expect(activateStubKafkaJs).not.to.have.been.called;
208208
});
209209

210210
it('should disable all instrumentations in specified groups', () => {

0 commit comments

Comments
 (0)