|
4 | 4 | */ |
5 | 5 | import * as vscode from 'vscode' |
6 | 6 | import assert from 'assert' |
7 | | -import { |
8 | | - LiveTailSession, |
9 | | - LiveTailSessionConfiguration, |
10 | | -} from '../../../../awsService/cloudWatchLogs/registry/liveTailSession' |
11 | | -import { |
12 | | - createLiveTailURIFromArgs, |
13 | | - LiveTailSessionRegistry, |
14 | | -} from '../../../../awsService/cloudWatchLogs/registry/liveTailSessionRegistry' |
| 7 | +import { LiveTailSessionConfiguration } from '../../../../awsService/cloudWatchLogs/registry/liveTailSession' |
| 8 | +import { createLiveTailURIFromArgs } from '../../../../awsService/cloudWatchLogs/registry/liveTailSessionRegistry' |
15 | 9 | import { CLOUDWATCH_LOGS_LIVETAIL_SCHEME } from '../../../../shared/constants' |
16 | 10 |
|
17 | | -/** |
18 | | - * Exposes protected methods so we can test them |
19 | | - */ |
20 | | -class TestLiveTailSessionRegistry extends LiveTailSessionRegistry { |
21 | | - constructor() { |
22 | | - super() |
23 | | - } |
24 | | - |
25 | | - override hash(uri: vscode.Uri): string { |
26 | | - return super.hash(uri) |
27 | | - } |
28 | | - |
29 | | - override get default(): LiveTailSession { |
30 | | - return super.default |
31 | | - } |
32 | | -} |
33 | | - |
34 | | -describe('LiveTailRegistry', async function () { |
35 | | - const session = new LiveTailSession({ |
36 | | - logGroupName: 'test-log-group', |
37 | | - region: 'test-region', |
38 | | - }) |
39 | | - |
40 | | - let liveTailSessionRegistry: TestLiveTailSessionRegistry |
41 | | - |
42 | | - beforeEach(function () { |
43 | | - liveTailSessionRegistry = new TestLiveTailSessionRegistry() |
44 | | - }) |
45 | | - |
46 | | - it('hash()', function () { |
47 | | - assert.deepStrictEqual(liveTailSessionRegistry.hash(session.uri), session.uri.toString()) |
48 | | - }) |
49 | | - |
50 | | - it('default()', function () { |
51 | | - assert.throws(() => liveTailSessionRegistry.default) |
52 | | - }) |
53 | | -}) |
54 | | - |
55 | 11 | describe('LiveTailSession URI', async function () { |
56 | 12 | const testLogGroupName = 'test-log-group' |
57 | 13 | const testRegion = 'test-region' |
|
0 commit comments