-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8c8509
commit ecb41d3
Showing
12 changed files
with
75 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ import { | |
import * as assert from 'assert'; | ||
import * as mysql from 'mysql'; | ||
import { MysqlPlugin, plugin } from '../src'; | ||
import * as testUtils from './testUtils'; | ||
import * as testUtils from '@opentelemetry/test-utils'; | ||
import { AttributeNames } from '../src/enums'; | ||
import { CanonicalCode } from '@opentelemetry/types'; | ||
|
||
|
@@ -54,7 +54,7 @@ describe('[email protected]', () => { | |
} | ||
tracer.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); | ||
if (testMysqlLocally) { | ||
testUtils.startDocker(); | ||
testUtils.startDocker('mysql'); | ||
// wait 15 seconds for docker container to start | ||
this.timeout(20000); | ||
setTimeout(done, 15000); | ||
|
@@ -66,7 +66,7 @@ describe('[email protected]', () => { | |
after(function() { | ||
if (testMysqlLocally) { | ||
this.timeout(5000); | ||
testUtils.cleanUpDocker(); | ||
testUtils.cleanUpDocker('mysql'); | ||
} | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ import { AttributeNames } from '../src/enums'; | |
import * as assert from 'assert'; | ||
import * as pg from 'pg'; | ||
import * as assertionUtils from './assertionUtils'; | ||
import * as testUtils from './testUtils'; | ||
import * as testUtils from '@opentelemetry/test-utils'; | ||
|
||
const memoryExporter = new InMemorySpanExporter(); | ||
|
||
|
@@ -103,7 +103,7 @@ describe('[email protected]', () => { | |
} | ||
tracer.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); | ||
if (testPostgresLocally) { | ||
testUtils.startDocker(); | ||
testUtils.startDocker('postgres'); | ||
} | ||
|
||
client = new pg.Client(CONFIG); | ||
|
@@ -116,7 +116,7 @@ describe('[email protected]', () => { | |
|
||
after(async () => { | ||
if (testPostgresLocally) { | ||
testUtils.cleanUpDocker(); | ||
testUtils.cleanUpDocker('postgres'); | ||
} | ||
await client.end(); | ||
}); | ||
|
54 changes: 0 additions & 54 deletions
54
packages/opentelemetry-plugin-postgres/opentelemetry-plugin-pg/test/testUtils.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ import { NodeTracer } from '@opentelemetry/node'; | |
import { plugin, RedisPlugin } from '../src'; | ||
import * as redisTypes from 'redis'; | ||
import { NoopLogger } from '@opentelemetry/core'; | ||
import * as dockerUtils from './testUtils'; | ||
import * as dockerUtils from '@opentelemetry/test-utils'; | ||
import * as assertionUtils from './assertionUtils'; | ||
import { SpanKind, Status, CanonicalCode } from '@opentelemetry/types'; | ||
import { AttributeNames } from '../src/enums'; | ||
|
@@ -64,7 +64,7 @@ describe('[email protected]', () => { | |
} | ||
|
||
if (shouldTestLocal) { | ||
dockerUtils.startDocker(); | ||
dockerUtils.startDocker('redis'); | ||
} | ||
|
||
redis = require('redis'); | ||
|
@@ -74,7 +74,7 @@ describe('[email protected]', () => { | |
|
||
after(() => { | ||
if (shouldTestLocal) { | ||
dockerUtils.cleanUpDocker(); | ||
dockerUtils.cleanUpDocker('redis'); | ||
} | ||
}); | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@opentelemetry/test-utils", | ||
"version": "0.3.1", | ||
"description": "Test utilities.", | ||
"main": "build/testUtils.js", | ||
"scripts": { | ||
"precompile": "tsc --version", | ||
"compile": "tsc -p .", | ||
"prepare": "npm run compile" | ||
}, | ||
"repository": "open-telemetry/opentelemetry-js", | ||
"keywords": [ | ||
"opentelemetry", | ||
"test-utils" | ||
], | ||
"author": "OpenTelemetry Authors", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/open-telemetry/opentelemetry-js/issues" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", | ||
"devDependencies": { | ||
"gts": "^1.1.2", | ||
"ts-node": "^8.5.4", | ||
"tslint-consistent-codestyle": "^1.16.0", | ||
"tslint-microsoft-contrib": "^6.2.0", | ||
"typescript": "3.7.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "../tsconfig.base", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "build" | ||
}, | ||
"include": [ | ||
"*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"rulesDirectory": ["node_modules/tslint-microsoft-contrib"], | ||
"extends": ["../../tslint.base.js", "./node_modules/tslint-consistent-codestyle"] | ||
} |