mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 23:35:54 +01:00
Fix compilation errors in tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -13,8 +13,8 @@ import { IConfigurationService } from '../../../configuration/common/configurati
|
|||||||
import { TestConfigurationService } from '../../../configuration/test/common/testConfigurationService.js';
|
import { TestConfigurationService } from '../../../configuration/test/common/testConfigurationService.js';
|
||||||
import { IEnvironmentService } from '../../../environment/common/environment.js';
|
import { IEnvironmentService } from '../../../environment/common/environment.js';
|
||||||
import { IAllowedExtensionsService, IGalleryExtension } from '../../common/extensionManagement.js';
|
import { IAllowedExtensionsService, IGalleryExtension } from '../../common/extensionManagement.js';
|
||||||
import { IExtensionGalleryManifestService } from '../../common/extensionGalleryManifest.js';
|
import { ExtensionGalleryManifestStatus, IExtensionGalleryManifestService } from '../../common/extensionGalleryManifest.js';
|
||||||
import { AbstractExtensionGalleryService, ExtensionGalleryServiceWithNoStorageService, IRawGalleryExtensionVersion, sortExtensionVersions, filterLatestExtensionVersionsForTargetPlatform } from '../../common/extensionGalleryService.js';
|
import { ExtensionGalleryServiceWithNoStorageService, IRawGalleryExtensionVersion, sortExtensionVersions, filterLatestExtensionVersionsForTargetPlatform } from '../../common/extensionGalleryService.js';
|
||||||
import { IFileService } from '../../../files/common/files.js';
|
import { IFileService } from '../../../files/common/files.js';
|
||||||
import { FileService } from '../../../files/common/fileService.js';
|
import { FileService } from '../../../files/common/fileService.js';
|
||||||
import { InMemoryFileSystemProvider } from '../../../files/common/inMemoryFilesystemProvider.js';
|
import { InMemoryFileSystemProvider } from '../../../files/common/inMemoryFilesystemProvider.js';
|
||||||
@@ -469,7 +469,7 @@ suite('Extension Gallery Service - Auto Update Builtin Extensions', () => {
|
|||||||
|
|
||||||
const disposables = ensureNoDisposablesAreLeakedInTestSuite();
|
const disposables = ensureNoDisposablesAreLeakedInTestSuite();
|
||||||
|
|
||||||
function createGalleryService(autoUpdateBuiltinExtensions: string[], productVersion: string = '1.66.0'): AbstractExtensionGalleryService {
|
function createGalleryService(autoUpdateBuiltinExtensions: string[], productVersion: string = '1.66.0') {
|
||||||
const instantiationService = disposables.add(new TestInstantiationService());
|
const instantiationService = disposables.add(new TestInstantiationService());
|
||||||
const logService = new NullLogService();
|
const logService = new NullLogService();
|
||||||
const fileService = disposables.add(new FileService(logService));
|
const fileService = disposables.add(new FileService(logService));
|
||||||
@@ -477,18 +477,18 @@ suite('Extension Gallery Service - Auto Update Builtin Extensions', () => {
|
|||||||
disposables.add(fileService.registerProvider('vscode-tests', fileSystemProvider));
|
disposables.add(fileService.registerProvider('vscode-tests', fileSystemProvider));
|
||||||
instantiationService.stub(ILogService, logService);
|
instantiationService.stub(ILogService, logService);
|
||||||
instantiationService.stub(IFileService, fileService);
|
instantiationService.stub(IFileService, fileService);
|
||||||
instantiationService.stub(IRequestService, { async request() { return { res: { statusCode: 200 }, stream: newWriteableBufferStream() }; } });
|
instantiationService.stub(IRequestService, { async request() { return { res: { statusCode: 200, headers: {} }, stream: newWriteableBufferStream() }; } });
|
||||||
instantiationService.stub(IEnvironmentService, new EnvironmentServiceMock(joinPath(URI.file('tests').with({ scheme: 'vscode-tests' }), 'machineid')));
|
instantiationService.stub(IEnvironmentService, new EnvironmentServiceMock(joinPath(URI.file('tests').with({ scheme: 'vscode-tests' }), 'machineid')));
|
||||||
instantiationService.stub(ITelemetryService, NullTelemetryService);
|
instantiationService.stub(ITelemetryService, NullTelemetryService);
|
||||||
instantiationService.stub(IConfigurationService, new TestConfigurationService());
|
instantiationService.stub(IConfigurationService, new TestConfigurationService());
|
||||||
instantiationService.stub(IAllowedExtensionsService, { isAllowed: () => true });
|
instantiationService.stub(IAllowedExtensionsService, { isAllowed: () => true });
|
||||||
instantiationService.stub(IExtensionGalleryManifestService, { extensionGalleryManifest: undefined, extensionGalleryManifestStatus: 0 });
|
instantiationService.stub(IExtensionGalleryManifestService, 'extensionGalleryManifestStatus', ExtensionGalleryManifestStatus.Available);
|
||||||
instantiationService.stub(IProductService, {
|
instantiationService.stub(IProductService, {
|
||||||
_serviceBrand: undefined,
|
_serviceBrand: undefined,
|
||||||
version: productVersion,
|
version: productVersion,
|
||||||
autoUpdateBuiltinExtensions,
|
autoUpdateBuiltinExtensions,
|
||||||
});
|
});
|
||||||
return disposables.add(instantiationService.createInstance(ExtensionGalleryServiceWithNoStorageService));
|
return instantiationService.createInstance(ExtensionGalleryServiceWithNoStorageService);
|
||||||
}
|
}
|
||||||
|
|
||||||
function aGalleryExtension(id: string, version: string): IGalleryExtension {
|
function aGalleryExtension(id: string, version: string): IGalleryExtension {
|
||||||
|
|||||||
Reference in New Issue
Block a user