Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate UniversalPackagesV0 to Node 10 #15848

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tasks/UniversalPackagesV0/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ describe('UniversalPackages Suite', function () {
after(() => {
});

it('downloads package from current organization', (done: MochaDone) => {
this.timeout(1000);
it('downloads package from current organization', function (done: Mocha.Done) {
this.timeout(5000);
let tp = path.join(__dirname, './downloadInternal.js')
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);

Expand All @@ -22,4 +22,4 @@ describe('UniversalPackages Suite', function () {
assert.equal(tr.errorIssues.length, 0, "should have no errors");
done();
});
});
});
10 changes: 5 additions & 5 deletions Tasks/UniversalPackagesV0/Tests/UniversalMockHelper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TaskLibAnswers, TaskLibAnswerExecResult } from 'azure-pipelines-task-lib/mock-answer';
import tmrm = require('azure-pipelines-task-lib/mock-run');
import * as pkgMock from 'packaging-common/Tests/MockHelper';
import * as artMock from 'packaging-common/Tests/ArtifactToolMockHelper';
import * as pkgMock from 'azure-pipelines-tasks-packaging-common-v3/Tests/MockHelper';
import * as artMock from 'azure-pipelines-tasks-packaging-common-v3/Tests/ArtifactToolMockHelper';

export class UniversalMockHelper {
private static ArtifactToolCmd: string = 'c:\\mock\\location\\ArtifactTool.exe';
Expand All @@ -21,7 +21,7 @@ export class UniversalMockHelper {
this.tmr.setInput('verbosity', "verbose");

process.env['AGENT_HOMEDIRECTORY'] = "c:\\agent\\home\\directory";
process.env['BUILD_SOURCESDIRECTORY'] = "c:\\agent\\home\\directory\\sources",
process.env['BUILD_SOURCESDIRECTORY'] = "c:\\agent\\home\\directory\\sources";
process.env['ENDPOINT_AUTH_SYSTEMVSSCONNECTION'] = "{\"parameters\":{\"AccessToken\":\"token\"},\"scheme\":\"OAuth\"}";
process.env['ENDPOINT_URL_SYSTEMVSSCONNECTION'] = "https://example.visualstudio.com/defaultcollection";
process.env['SYSTEM_DEFAULTWORKINGDIRECTORY'] = "c:\\agent\\home\\directory";
Expand All @@ -35,10 +35,10 @@ export class UniversalMockHelper {
pkgMock.registerLocationHelpersMock(tmr);
}

public mockUniversalCommand(command: string, feed:string, packageName: string, packageVersion: string, path: string, result: TaskLibAnswerExecResult, service?: string) {
public mockUniversalCommand(command: string, feed: string, packageName: string, packageVersion: string, path: string, result: TaskLibAnswerExecResult, service?: string) {
if (!service) {
service = "https://example.visualstudio.com/defaultcollection";
}
this.answers.exec[`${UniversalMockHelper.ArtifactToolCmd} universal ${command} --feed ${feed} --service ${service} --package-name ${packageName} --package-version ${packageVersion} --path ${path} --patvar UNIVERSAL_DOWNLOAD_PAT --verbosity verbose`] = result;
}
}
}
23 changes: 0 additions & 23 deletions Tasks/UniversalPackagesV0/make.json

This file was deleted.

Loading