Skip to content

Commit aad9d88

Browse files
committed
remove unnecessay changes
1 parent 6983c91 commit aad9d88

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tasks/offlinePackagingTasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function cleanSync(deleteVsix: boolean) {
7373

7474
async function doOfflinePackage(platformInfo: PlatformInformation, packageName: string, packageJSON: any, outputFolder: string) {
7575
if (process.platform === 'win32') {
76-
//throw new Error('Do not build offline packages on windows. Runtime executables will not be marked executable in *nix packages.');
76+
throw new Error('Do not build offline packages on windows. Runtime executables will not be marked executable in *nix packages.');
7777
}
7878

7979
cleanSync(false);

test/unitTests/Packages/PackageManager.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as chai from 'chai';
99
import * as util from '../../../src/common';
1010
import { CreateTmpDir, TmpAsset } from '../../../src/CreateTmpAsset';
1111
import TestZip from '../testAssets/TestZip';
12-
import { IPackage } from '../../../src/packageManager/Package';
1312
import { DownloadAndInstallPackages } from '../../../src/packageManager/PackageManager';
1413
import NetworkSettings from '../../../src/NetworkSettings';
1514
import { PlatformInformation } from '../../../src/platform';
@@ -18,6 +17,7 @@ import { DownloadStart, DownloadSizeObtained, DownloadProgress, DownloadSuccess,
1817
import MockHttpsServer from '../testAssets/MockHttpsServer';
1918
import { createTestFile } from '../testAssets/TestFile';
2019
import TestEventBus from '../testAssets/TestEventBus';
20+
import { Package } from '../../../src/packageManager/Package';
2121

2222
chai.use(require("chai-as-promised"));
2323
const expect = chai.expect;
@@ -26,10 +26,10 @@ suite("Package Manager", () => {
2626
let tmpInstallDir: TmpAsset;
2727
let server: MockHttpsServer;
2828
let testZip: TestZip;
29-
let installationPath: string;
29+
let extensionPath: string;
3030
let eventStream: EventStream;
3131
let eventBus: TestEventBus;
32-
let packages: IPackage[];
32+
let packages: Package[];
3333

3434
const packageDescription = "Test Package";
3535

@@ -42,12 +42,12 @@ suite("Package Manager", () => {
4242
server = await MockHttpsServer.CreateMockHttpsServer();
4343
eventBus = new TestEventBus(eventStream);
4444
tmpInstallDir = await CreateTmpDir(true);
45-
installationPath = tmpInstallDir.name;
46-
packages = <IPackage[]>[
45+
extensionPath = tmpInstallDir.name;
46+
packages = <Package[]>[
4747
{
4848
url: `${server.baseUrl}/package`,
4949
description: packageDescription,
50-
installPath: installationPath,
50+
installPath: "installPath",
5151
platforms: [windowsPlatformInfo.platform],
5252
architectures: [windowsPlatformInfo.architecture]
5353
}];
@@ -61,9 +61,9 @@ suite("Package Manager", () => {
6161
});
6262

6363
test("Downloads the package and installs at the specified path", async () => {
64-
await DownloadAndInstallPackages(packages, networkSettingsProvider, windowsPlatformInfo, eventStream);
64+
await DownloadAndInstallPackages(packages, networkSettingsProvider, windowsPlatformInfo, eventStream, extensionPath);
6565
for (let elem of testZip.files) {
66-
let filePath = path.join(installationPath, elem.path);
66+
let filePath = path.join(extensionPath, "installPath", elem.path);
6767
expect(await util.fileExists(filePath)).to.be.true;
6868
}
6969
});
@@ -77,13 +77,13 @@ suite("Package Manager", () => {
7777
new InstallationStart(packageDescription)
7878
];
7979

80-
await DownloadAndInstallPackages(packages, networkSettingsProvider, windowsPlatformInfo, eventStream);
80+
await DownloadAndInstallPackages(packages, networkSettingsProvider, windowsPlatformInfo, eventStream, extensionPath);
8181
expect(eventBus.getEvents()).to.be.deep.equal(eventsSequence);
8282
});
8383

8484
test("Installs only the platform specific packages", async () => {
8585
//since there is no linux package specified no package should be installed
86-
await DownloadAndInstallPackages(packages, networkSettingsProvider, linuxPlatformInfo, eventStream);
86+
await DownloadAndInstallPackages(packages, networkSettingsProvider, linuxPlatformInfo, eventStream, extensionPath);
8787
let files = await fs.readdir(tmpInstallDir.name);
8888
expect(files.length).to.equal(0);
8989
});

0 commit comments

Comments
 (0)