Skip to content

Commit

Permalink
Ensure authentication via pat works in onprem for internal package fe…
Browse files Browse the repository at this point in the history
…ed (#9917)

* Ensure authentication via pat works in onprem for internal package feed

* used constants

* Fixed failing tests

* Fixed versioning scheme to reflect sprints
  • Loading branch information
ShreyasRmsft authored Mar 25, 2019
1 parent fd7a95c commit ab84caf
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Tasks/VsTestPlatformToolInstallerV1/Tests/TestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, constants.
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, process.env[testConstants.feedId]);
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, constants.source);
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, process.env[constants.customFeed]);
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, constants.validAuthenticationTypes);
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, constants.basic);
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, constants.usernameParam);
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, process.env[constants.username]);
writeNugetConfigCommand = testHelpers.addArg(writeNugetConfigCommand, constants.passwordParam);
Expand Down
2 changes: 2 additions & 0 deletions Tasks/VsTestPlatformToolInstallerV1/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const defaultPackageSource = 'https://api.nuget.org/v3/index.json';

// nuget exe parameters
export const list = 'list';
export const basic = 'basic';
export const install = 'install';
export const sources = 'sources';
export const add = 'Add';
Expand All @@ -28,6 +29,7 @@ export const configFile = '-ConfigFile';
export const preRelease = '-PreRelease';
export const directDownload = '-DirectDownload';
export const outputDirectory = '-OutputDirectory';
export const validAuthenticationTypes = '-ValidAuthenticationTypes';

// input fields
export const netShare = 'netShare';
Expand Down
2 changes: 1 addition & 1 deletion Tasks/VsTestPlatformToolInstallerV1/make.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"externals": {
"files": [
{
"url": "https://dist.nuget.org/win-x86-commandline/v4.7.0/nuget.exe",
"url": "https://dist.nuget.org/win-x86-commandline/v5.0.0-preview4/nuget.exe",
"dest": "nuget.exe"
}
]
Expand Down
1 change: 1 addition & 0 deletions Tasks/VsTestPlatformToolInstallerV1/nugetfeedinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export class NugetFeedInstaller {

nugetTool.arg(constants.sources).arg(constants.add).arg(constants.noninteractive)
.arg(constants.name).arg(feedId).arg(constants.source).arg(feedUrl)
.arg(constants.validAuthenticationTypes).arg(constants.basic)
.argIf(password, constants.usernameParam).argIf(password, username)
.argIf(password, constants.passwordParam).argIf(password, password)
.argIf(configFilePath, constants.configFile).argIf(configFilePath, configFilePath);
Expand Down
10 changes: 5 additions & 5 deletions Tasks/VsTestPlatformToolInstallerV1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Tasks/VsTestPlatformToolInstallerV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 1,
"Patch": 6
"Minor": 150,
"Patch": 0
},
"satisfies": [
"VsTest"
Expand Down
4 changes: 2 additions & 2 deletions Tasks/VsTestPlatformToolInstallerV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 1,
"Patch": 6
"Minor": 150,
"Patch": 0
},
"satisfies": [
"VsTest"
Expand Down

0 comments on commit ab84caf

Please sign in to comment.