From b170ecc893a75036d29e7610dbf127eccdd60389 Mon Sep 17 00:00:00 2001 From: Peter Spillman Date: Wed, 14 Jun 2017 18:45:32 -0400 Subject: [PATCH] fix L0 cross plat test failures --- Tasks/DotNetCoreCLI/Tests/PackTests/packEnvVar.ts | 4 ++-- Tasks/DotNetCoreCLI/Tests/PushTests/internalFeed.ts | 3 +++ Tasks/Npm/Tests/npm-failureDumpsLog-workingDir.ts | 2 +- Tasks/NuGetCommand/Tests/PackTests/packEnvVar.ts | 4 ++-- Tasks/NuGetCommand/Tests/PublishTests/externalFeedNuGet.ts | 2 +- Tasks/NuGetCommand/Tests/PublishTests/internalFeedNuGet.ts | 2 +- .../Tests/PublishTests/internalFeedVstsNuGetPush.ts | 2 +- .../PublishTests/internalFeedVstsNuGetPushAllowConflict.ts | 2 +- .../PublishTests/internalFeedVstsNuGetPushDisallowConflict.ts | 2 +- 9 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Tasks/DotNetCoreCLI/Tests/PackTests/packEnvVar.ts b/Tasks/DotNetCoreCLI/Tests/PackTests/packEnvVar.ts index 4d2ce7cacec2..69e7779bf8f4 100644 --- a/Tasks/DotNetCoreCLI/Tests/PackTests/packEnvVar.ts +++ b/Tasks/DotNetCoreCLI/Tests/PackTests/packEnvVar.ts @@ -12,7 +12,7 @@ tmr.setInput('command', 'pack'); tmr.setInput('searchPatternPack', 'foo.nuspec'); tmr.setInput('outputDir', 'C:\\out\\dir'); tmr.setInput('versioningScheme', 'byEnvVar'); -tmr.setInput('versionEnvVar', 'foobarVersionEnvVar'); +tmr.setInput('versionEnvVar', 'FOOBARVERSIONENVVAR'); let a: ma.TaskLibAnswers = { "osType": {}, @@ -44,7 +44,7 @@ let a: ma.TaskLibAnswers = { }; nmh.setAnswers(a); -process.env['foobarVersionEnvVar'] = 'XX.YY.ZZ' +process.env['FOOBARVERSIONENVVAR'] = 'XX.YY.ZZ' nmh.registerNugetUtilityMock(["c:\\agent\\home\\directory\\foo.nuspec"]); nmh.registerDefaultNugetVersionMock(); nmh.registerToolRunnerMock(); diff --git a/Tasks/DotNetCoreCLI/Tests/PushTests/internalFeed.ts b/Tasks/DotNetCoreCLI/Tests/PushTests/internalFeed.ts index b5563d6efd7c..d5e7482715da 100644 --- a/Tasks/DotNetCoreCLI/Tests/PushTests/internalFeed.ts +++ b/Tasks/DotNetCoreCLI/Tests/PushTests/internalFeed.ts @@ -38,6 +38,9 @@ let a: ma.TaskLibAnswers = { "rmRF": { "c:\\agent\\home\\directory\\NuGet_1": { "success": true + }, + "c:\\agent\\home\\directory/NuGet_1": { + "success": true } }, "findMatch": { diff --git a/Tasks/Npm/Tests/npm-failureDumpsLog-workingDir.ts b/Tasks/Npm/Tests/npm-failureDumpsLog-workingDir.ts index 99abe684e092..432679781716 100644 --- a/Tasks/Npm/Tests/npm-failureDumpsLog-workingDir.ts +++ b/Tasks/Npm/Tests/npm-failureDumpsLog-workingDir.ts @@ -16,7 +16,7 @@ tmr.mockNpmCommand('custom', { code: -1, stdout: 'some npm failure' } as TaskLibAnswerExecResult); -tmr.answers.exist['C:\\mock\\workingDir\\npm-debug.log'] = true; +tmr.answers.exist[path.join("C:\\mock\\workingDir", "npm-debug.log")] = true; let mockFs = require('fs'); tmr.registerMock('fs', mockFs); diff --git a/Tasks/NuGetCommand/Tests/PackTests/packEnvVar.ts b/Tasks/NuGetCommand/Tests/PackTests/packEnvVar.ts index fc1f46423fbe..42d575cda569 100644 --- a/Tasks/NuGetCommand/Tests/PackTests/packEnvVar.ts +++ b/Tasks/NuGetCommand/Tests/PackTests/packEnvVar.ts @@ -13,7 +13,7 @@ tmr.setInput('searchPatternPack', 'foo.nuspec'); tmr.setInput('outputDir', 'C:\\out\\dir'); tmr.setInput('command', 'pack'); tmr.setInput('versioningScheme', 'byEnvVar'); -tmr.setInput('versionEnvVar', 'foobarVersionEnvVar'); +tmr.setInput('versionEnvVar', 'FOOBARVERSIONENVVAR'); let a: ma.TaskLibAnswers = { "osType": {}, @@ -42,7 +42,7 @@ let a: ma.TaskLibAnswers = { }; nmh.setAnswers(a); -process.env['foobarVersionEnvVar'] = 'XX.YY.ZZ' +process.env['FOOBARVERSIONENVVAR'] = 'XX.YY.ZZ' nmh.registerNugetUtilityMock(["c:\\agent\\home\\directory\\foo.nuspec"]); nmh.registerDefaultNugetVersionMock(); nmh.registerToolRunnerMock(); diff --git a/Tasks/NuGetCommand/Tests/PublishTests/externalFeedNuGet.ts b/Tasks/NuGetCommand/Tests/PublishTests/externalFeedNuGet.ts index a3953918cfc9..5332f5c7988c 100644 --- a/Tasks/NuGetCommand/Tests/PublishTests/externalFeedNuGet.ts +++ b/Tasks/NuGetCommand/Tests/PublishTests/externalFeedNuGet.ts @@ -38,7 +38,7 @@ let a: ma.TaskLibAnswers = { }; nmh.setAnswers(a); -process.env["NuGet_ForceNuGetForPush"] = "true"; +process.env["NUGET_FORCENUGETFORPUSH"] = "true"; nmh.registerNugetUtilityMock(["c:\\agent\\home\\directory\\foo.nupkg"]); nmh.registerDefaultNugetVersionMock(); nmh.registerToolRunnerMock(); diff --git a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedNuGet.ts b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedNuGet.ts index a3cf6c67f478..d8cc2fa46778 100644 --- a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedNuGet.ts +++ b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedNuGet.ts @@ -39,7 +39,7 @@ let a: ma.TaskLibAnswers = { }; nmh.setAnswers(a); -process.env["NuGet_ForceNuGetForPush"] = "true"; +process.env["NUGET_FORCENUGETFORPUSH"] = "true"; nmh.registerNugetUtilityMock(["c:\\agent\\home\\directory\\foo.nupkg"]); nmh.registerDefaultNugetVersionMock(); nmh.registerToolRunnerMock(); diff --git a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPush.ts b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPush.ts index 0ec501ae49b1..b6acb2f55a63 100644 --- a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPush.ts +++ b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPush.ts @@ -39,7 +39,7 @@ let a: ma.TaskLibAnswers = { }; nmh.setAnswers(a); -process.env["NuGet_ForceVstsNuGetPushForPush"] = "true"; +process.env["NUGET_FORCEVSTSNUGETPUSHFORPUSH"] = "true"; nmh.registerNugetUtilityMock(["c:\\agent\\home\\directory\\foo.nupkg"]); nmh.registerDefaultNugetVersionMock(); nmh.registerToolRunnerMock(); diff --git a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushAllowConflict.ts b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushAllowConflict.ts index ad848fd74289..8583ac4d2ec8 100644 --- a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushAllowConflict.ts +++ b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushAllowConflict.ts @@ -39,7 +39,7 @@ let a: ma.TaskLibAnswers = { }; nmh.setAnswers(a); -process.env["NuGet_ForceVstsNuGetPushForPush"] = "true"; +process.env["NUGET_FORCEVSTSNUGETPUSHFORPUSH"] = "true"; nmh.registerNugetUtilityMock(["c:\\agent\\home\\directory\\foo.nupkg"]); nmh.registerDefaultNugetVersionMock(); nmh.registerToolRunnerMock(); diff --git a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushDisallowConflict.ts b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushDisallowConflict.ts index 84c6e5a955cc..9af82908f188 100644 --- a/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushDisallowConflict.ts +++ b/Tasks/NuGetCommand/Tests/PublishTests/internalFeedVstsNuGetPushDisallowConflict.ts @@ -39,7 +39,7 @@ let a: ma.TaskLibAnswers = { }; nmh.setAnswers(a); -process.env["NuGet_ForceVstsNuGetPushForPush"] = "true"; +process.env["NUGET_FORCEVSTSNUGETPUSHFORPUSH"] = "true"; nmh.registerNugetUtilityMock(["c:\\agent\\home\\directory\\foo.nupkg"]); nmh.registerDefaultNugetVersionMock(); nmh.registerToolRunnerMock();