File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export * from '@microsoft/vscode-azext-utils';
1818export * from './src/commands/tags/getTagDiagnostics' ;
1919export * from './src/utils/wrapFunctionsInTelemetry' ;
2020export * from './api/src/utils/wrapper' ;
21+ export { convertV1TreeItemId } from './src/api/compatibility/CompatibleAzExtTreeDataProvider' ;
2122// Export activate/deactivate for main.js
2223export { activateInternal , deactivateInternal } from './src/extension' ;
2324export * from './src/extensionVariables' ;
Original file line number Diff line number Diff line change 1+ /*---------------------------------------------------------------------------------------------
2+ * Copyright (c) Microsoft Corporation. All rights reserved.
3+ * Licensed under the MIT License. See License.txt in the project root for license information.
4+ *--------------------------------------------------------------------------------------------*/
5+
6+ import * as assert from 'assert' ;
7+ import { convertV1TreeItemId } from '../../../extension.bundle' ;
8+
9+ suite ( 'convertV1TreeItemId' , ( ) => {
10+ const validArmId = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.ContainerRegistry/registries/test-registry' ;
11+ test ( "Doesn't change a valid ARM id" , ( ) => {
12+ assert . strictEqual ( convertV1TreeItemId ( validArmId ) , validArmId ) ;
13+ } ) ;
14+
15+ test ( "Converts a v1 tree item id to ARM id" , ( ) => {
16+ const v1TreeItemId = '/subscriptions/00000000-0000-0000-0000-000000000000/ContainerRegistries/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.ContainerRegistry/registries/test-registry' ;
17+ assert . strictEqual ( convertV1TreeItemId ( v1TreeItemId ) , validArmId ) ;
18+ } ) ;
19+ } ) ;
You can’t perform that action at this time.
0 commit comments