From bbca7b9f1cd876506c974d936b917798b663ef0e Mon Sep 17 00:00:00 2001 From: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com> Date: Fri, 21 Jan 2022 09:46:18 +0000 Subject: [PATCH] Update tests to use node16 --- src/Test/L0/ProcessExtensionL0.cs | 4 ++-- src/Test/L0/Worker/ActionManagerL0.cs | 8 ++++---- src/Test/L0/Worker/ActionManifestManagerL0.cs | 2 +- src/Test/L0/Worker/StepHostL0.cs | 4 ++-- src/Test/TestData/nodeaction.yml | 2 +- src/Test/TestData/nodeaction_cleanup.yml | 2 +- src/Test/TestData/nodeaction_cleanup_default.yml | 2 +- src/Test/TestData/nodeaction_init.yml | 2 +- src/Test/TestData/nodeaction_init_default.yml | 2 +- src/Test/TestData/noderelativeaction.yml | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Test/L0/ProcessExtensionL0.cs b/src/Test/L0/ProcessExtensionL0.cs index 02be3991b..1fd01e304 100644 --- a/src/Test/L0/ProcessExtensionL0.cs +++ b/src/Test/L0/ProcessExtensionL0.cs @@ -27,9 +27,9 @@ namespace GitHub.Runner.Common.Tests try { #if OS_WINDOWS - string node = Path.Combine(TestUtil.GetSrcPath(), @"..\_layout\externals\node12\bin\node"); + string node = Path.Combine(TestUtil.GetSrcPath(), @"..\_layout\externals\node16\bin\node"); #else - string node = Path.Combine(TestUtil.GetSrcPath(), @"../_layout/externals/node12/bin/node"); + string node = Path.Combine(TestUtil.GetSrcPath(), @"../_layout/externals/node16/bin/node"); hc.EnqueueInstance(new ProcessInvokerWrapper()); #endif var startInfo = new ProcessStartInfo(node, "-e \"setTimeout(function(){{}}, 15 * 1000);\""); diff --git a/src/Test/L0/Worker/ActionManagerL0.cs b/src/Test/L0/Worker/ActionManagerL0.cs index 5334b236f..7c53cae78 100644 --- a/src/Test/L0/Worker/ActionManagerL0.cs +++ b/src/Test/L0/Worker/ActionManagerL0.cs @@ -1451,7 +1451,7 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'task.js' "; Pipelines.ActionStep instance; @@ -1730,7 +1730,7 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'task.js' "; Pipelines.ActionStep instance; @@ -1798,7 +1798,7 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'task.js' post: 'cleanup.js' "; @@ -2064,7 +2064,7 @@ author: 'GitHub' icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'task.js' "; CreateAction(yamlContent: Content, instance: out _, directory: out string directory); diff --git a/src/Test/L0/Worker/ActionManifestManagerL0.cs b/src/Test/L0/Worker/ActionManifestManagerL0.cs index d11f3c1e8..45d1781af 100644 --- a/src/Test/L0/Worker/ActionManifestManagerL0.cs +++ b/src/Test/L0/Worker/ActionManifestManagerL0.cs @@ -408,7 +408,7 @@ namespace GitHub.Runner.Common.Tests.Worker var nodeAction = result.Execution as NodeJSActionExecutionData; Assert.Equal("main.js", nodeAction.Script); - Assert.Equal("node12", nodeAction.NodeVersion); + Assert.Equal("node16", nodeAction.NodeVersion); } finally { diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs index 8d0a102ef..498785b89 100644 --- a/src/Test/L0/Worker/StepHostL0.cs +++ b/src/Test/L0/Worker/StepHostL0.cs @@ -45,10 +45,10 @@ namespace GitHub.Runner.Common.Tests.Worker .ReturnsAsync(0); // Act. - var nodeVersion = await sh.DetermineNodeRuntimeVersion(_ec.Object, "node12"); + var nodeVersion = await sh.DetermineNodeRuntimeVersion(_ec.Object, "node16"); // Assert. - Assert.Equal("node12", nodeVersion); + Assert.Equal("node16", nodeVersion); } } diff --git a/src/Test/TestData/nodeaction.yml b/src/Test/TestData/nodeaction.yml index 616889063..ca773bf98 100644 --- a/src/Test/TestData/nodeaction.yml +++ b/src/Test/TestData/nodeaction.yml @@ -16,5 +16,5 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'main.js' \ No newline at end of file diff --git a/src/Test/TestData/nodeaction_cleanup.yml b/src/Test/TestData/nodeaction_cleanup.yml index d6d522493..a7dc5768f 100644 --- a/src/Test/TestData/nodeaction_cleanup.yml +++ b/src/Test/TestData/nodeaction_cleanup.yml @@ -16,7 +16,7 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'main.js' post: 'cleanup.js' post-if: 'cancelled()' \ No newline at end of file diff --git a/src/Test/TestData/nodeaction_cleanup_default.yml b/src/Test/TestData/nodeaction_cleanup_default.yml index 1287ba048..e02491e3e 100644 --- a/src/Test/TestData/nodeaction_cleanup_default.yml +++ b/src/Test/TestData/nodeaction_cleanup_default.yml @@ -16,6 +16,6 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'main.js' post: 'cleanup.js' \ No newline at end of file diff --git a/src/Test/TestData/nodeaction_init.yml b/src/Test/TestData/nodeaction_init.yml index c1140b328..f39ef116a 100644 --- a/src/Test/TestData/nodeaction_init.yml +++ b/src/Test/TestData/nodeaction_init.yml @@ -16,7 +16,7 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'main.js' pre: 'init.js' pre-if: 'cancelled()' \ No newline at end of file diff --git a/src/Test/TestData/nodeaction_init_default.yml b/src/Test/TestData/nodeaction_init_default.yml index 8d300a11a..2bec273eb 100644 --- a/src/Test/TestData/nodeaction_init_default.yml +++ b/src/Test/TestData/nodeaction_init_default.yml @@ -16,6 +16,6 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'main.js' pre: 'init.js' \ No newline at end of file diff --git a/src/Test/TestData/noderelativeaction.yml b/src/Test/TestData/noderelativeaction.yml index de9b2d4cd..9e56c8b32 100644 --- a/src/Test/TestData/noderelativeaction.yml +++ b/src/Test/TestData/noderelativeaction.yml @@ -15,5 +15,5 @@ outputs: icon: 'hello.svg' # vector art to display in the GitHub Marketplace color: 'green' # optional, decorates the entry in the GitHub Marketplace runs: - using: 'node12' + using: 'node16' main: 'scripts/main.js' \ No newline at end of file