Skip to content

Commit

Permalink
add tests as per @MSNev request
Browse files Browse the repository at this point in the history
  • Loading branch information
lizthegrey committed Jul 12, 2021
1 parent e6a0f70 commit e65d5e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/opentelemetry-exporter-collector-grpc/test/util.test.ts
Expand Up @@ -50,6 +50,18 @@ describe('validateAndNormalizeUrl()', () => {
expected: 'api.datacat.io:1234',
warn: 'URL path should not be set when using grpc, the path part of the URL will be ignored.',
},
{
name: ':// in path should not be used for protocol even if protocol not specified',
input: 'api.datacat.io/a/b://c',
expected: 'api.datacat.io',
warn: 'URL path should not be set when using grpc, the path part of the URL will be ignored.',
},
{
name: ':// in path is valid when a protocol is specified',
input: 'grpc://api.datacat.io/a/b://c',
expected: 'api.datacat.io',
warn: 'URL path should not be set when using grpc, the path part of the URL will be ignored.',
},
];
tests.forEach(test => {
it(test.name, () => {
Expand Down

0 comments on commit e65d5e6

Please sign in to comment.