mirror of
https://github.com/actions/runner.git
synced 2025-12-16 06:57:25 +00:00
@@ -177,7 +177,7 @@ namespace GitHub.Runner.Common.Tests.Worker.Container
|
||||
[InlineData("foo", "bar", "foo=bar")]
|
||||
[InlineData("foo\\", "bar", "foo\\=bar")]
|
||||
[InlineData("foo\\", "bar\\", "foo\\=bar\\\\")]
|
||||
[InlineData("foo \\","bar \\", "foo \\=bar \\\\")]
|
||||
[InlineData("foo \\", "bar \\", "foo \\=bar \\\\")]
|
||||
public void CreateEscapedOption_keyValue(string keyInput, string valueInput, string escapedString)
|
||||
{
|
||||
var flag = "--example";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Runner.Listener;
|
||||
using GitHub.Runner.Listener;
|
||||
using GitHub.Runner.Listener.Configuration;
|
||||
using Moq;
|
||||
using System;
|
||||
@@ -721,11 +721,11 @@ namespace GitHub.Runner.Common.Tests
|
||||
[InlineData("run", "replace")]
|
||||
[InlineData("run", "runasservice")]
|
||||
[InlineData("run", "unattended")]
|
||||
[InlineData("warmup", "disableupdate")]
|
||||
[InlineData("warmup", "ephemeral")]
|
||||
[InlineData("warmup", "once")]
|
||||
[InlineData("warmup", "replace")]
|
||||
[InlineData("warmup", "runasservice")]
|
||||
[InlineData("warmup", "disableupdate")]
|
||||
[InlineData("warmup", "ephemeral")]
|
||||
[InlineData("warmup", "once")]
|
||||
[InlineData("warmup", "replace")]
|
||||
[InlineData("warmup", "runasservice")]
|
||||
[InlineData("warmup", "unattended")]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", nameof(CommandSettings))]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.Runner.Listener;
|
||||
using GitHub.Runner.Listener.Configuration;
|
||||
using GitHub.Runner.Common.Util;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Runner.Listener.Configuration;
|
||||
using GitHub.Runner.Listener.Configuration;
|
||||
using GitHub.Runner.Common.Util;
|
||||
using Moq;
|
||||
using System;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace GitHub.Runner.Common.Tests.Listener.Configuration
|
||||
{
|
||||
Tracing trace = context.GetTrace("OuthAccessToken");
|
||||
trace.Info("GetVssCredentials()");
|
||||
|
||||
|
||||
var loginCred = new VssOAuthAccessTokenCredential("sometoken");
|
||||
VssCredentials creds = new(loginCred);
|
||||
trace.Verbose("cred created");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.Runner.Listener;
|
||||
using GitHub.Runner.Listener.Configuration;
|
||||
using Moq;
|
||||
@@ -155,13 +155,13 @@ namespace GitHub.Runner.Common.Tests.Listener
|
||||
}
|
||||
}
|
||||
|
||||
public static TheoryData<string[], bool, Times> RunAsServiceTestData = new()
|
||||
{
|
||||
// staring with run command, configured as run as service, should start the runner
|
||||
{ new [] { "run" }, true, Times.Once() },
|
||||
// starting with no argument, configured not to run as service, should start runner interactively
|
||||
{ new [] { "run" }, false, Times.Once() }
|
||||
};
|
||||
public static TheoryData<string[], bool, Times> RunAsServiceTestData = new TheoryData<string[], bool, Times>()
|
||||
{
|
||||
// staring with run command, configured as run as service, should start the runner
|
||||
{ new [] { "run" }, true, Times.Once() },
|
||||
// starting with no argument, configured not to run as service, should start runner interactively
|
||||
{ new [] { "run" }, false, Times.Once() }
|
||||
};
|
||||
[Theory]
|
||||
[MemberData(nameof(RunAsServiceTestData))]
|
||||
[Trait("Level", "L0")]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if !(OS_WINDOWS && ARM64)
|
||||
#if !(OS_WINDOWS && ARM64)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Moq;
|
||||
using Moq;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Xunit;
|
||||
@@ -117,7 +117,7 @@ namespace GitHub.Runner.Common.Tests.Listener
|
||||
pagingLogger.End();
|
||||
|
||||
//Assert
|
||||
_jobServerQueue.Verify(x => x.QueueFileUpload(It.IsAny<Guid>(), It.IsAny<Guid>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), true), Times.Exactly(0));
|
||||
_jobServerQueue.Verify(x => x.QueueFileUpload(It.IsAny<Guid>(), It.IsAny<Guid>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), true), Times.Exactly(0));
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@@ -459,7 +459,7 @@ namespace GitHub.Runner.Common.Tests
|
||||
try
|
||||
{
|
||||
var proc = await processInvoker.ExecuteAsync("", "bash", "-c \"cat /proc/$$/oom_score_adj\"",
|
||||
new Dictionary<string, string> { {"PIPELINE_JOB_OOMSCOREADJ", "1234"} },
|
||||
new Dictionary<string, string> { { "PIPELINE_JOB_OOMSCOREADJ", "1234" } },
|
||||
false, null, false, null, false, false,
|
||||
highPriorityProcess: false,
|
||||
cancellationToken: tokenSource.Token);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Runner.Common.Util;
|
||||
using GitHub.Runner.Common.Util;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using System.Text;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using Sdk.RSWebApi.Contracts;
|
||||
using Xunit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
using GitHub.Runner.Listener.Configuration;
|
||||
using Xunit;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace GitHub.Runner.Common.Tests
|
||||
}
|
||||
}
|
||||
|
||||
#if OS_WINDOWS
|
||||
#if OS_WINDOWS
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Service")]
|
||||
@@ -163,46 +163,46 @@ namespace GitHub.Runner.Common.Tests
|
||||
Assert.Equal("name", serviceNameParts[3]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Service")]
|
||||
public void CalculateServiceNameLimitsServiceNameTo150Chars()
|
||||
#else
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Service")]
|
||||
public void CalculateServiceNameLimitsServiceNameTo150Chars()
|
||||
{
|
||||
RunnerSettings settings = new();
|
||||
|
||||
settings.AgentName = "thisisareallyreallylongbutstillvalidagentnameiamusingforthisexampletotestverylongnamelimits";
|
||||
settings.ServerUrl = "https://example.githubusercontent.com/12345678901234567890123456789012345678901234567890";
|
||||
settings.GitHubUrl = "https://github.com/myreallylongorganizationexampleonlinux/myreallylongrepoexampleonlinux1234";
|
||||
|
||||
string serviceNamePattern = "actions.runner.{0}.{1}";
|
||||
string serviceDisplayNamePattern = "GitHub Actions Runner ({0}.{1})";
|
||||
|
||||
using (TestHostContext hc = CreateTestContext())
|
||||
{
|
||||
RunnerSettings settings = new();
|
||||
ServiceControlManager scm = new();
|
||||
|
||||
settings.AgentName = "thisisareallyreallylongbutstillvalidagentnameiamusingforthisexampletotestverylongnamelimits";
|
||||
settings.ServerUrl = "https://example.githubusercontent.com/12345678901234567890123456789012345678901234567890";
|
||||
settings.GitHubUrl = "https://github.com/myreallylongorganizationexampleonlinux/myreallylongrepoexampleonlinux1234";
|
||||
scm.Initialize(hc);
|
||||
scm.CalculateServiceName(
|
||||
settings,
|
||||
serviceNamePattern,
|
||||
serviceDisplayNamePattern,
|
||||
out string serviceName,
|
||||
out string serviceDisplayName);
|
||||
|
||||
string serviceNamePattern = "actions.runner.{0}.{1}";
|
||||
string serviceDisplayNamePattern = "GitHub Actions Runner ({0}.{1})";
|
||||
// Verify name has been shortened to 150
|
||||
Assert.Equal(150, serviceName.Length);
|
||||
|
||||
using (TestHostContext hc = CreateTestContext())
|
||||
{
|
||||
ServiceControlManager scm = new();
|
||||
var serviceNameParts = serviceName.Split('.');
|
||||
|
||||
scm.Initialize(hc);
|
||||
scm.CalculateServiceName(
|
||||
settings,
|
||||
serviceNamePattern,
|
||||
serviceDisplayNamePattern,
|
||||
out string serviceName,
|
||||
out string serviceDisplayName);
|
||||
|
||||
// Verify name has been shortened to 150
|
||||
Assert.Equal(150, serviceName.Length);
|
||||
|
||||
var serviceNameParts = serviceName.Split('.');
|
||||
|
||||
// Verify that each component has been shortened to a sensible length
|
||||
Assert.Equal("actions", serviceNameParts[0]); // Never shortened
|
||||
Assert.Equal("runner", serviceNameParts[1]); // Never shortened
|
||||
Assert.Equal("myreallylongorganizationexampleonlinux-myreallylongrepoexampleonlinux1", serviceNameParts[2]); // First 70 chars, '/' has been replaced with '-'
|
||||
Assert.Matches(@"^(thisisareallyreallylongbutstillvalidagentnameiamusingforthi-[0-9]{4})$", serviceNameParts[3]);
|
||||
}
|
||||
// Verify that each component has been shortened to a sensible length
|
||||
Assert.Equal("actions", serviceNameParts[0]); // Never shortened
|
||||
Assert.Equal("runner", serviceNameParts[1]); // Never shortened
|
||||
Assert.Equal("myreallylongorganizationexampleonlinux-myreallylongrepoexampleonlinux1", serviceNameParts[2]); // First 70 chars, '/' has been replaced with '-'
|
||||
Assert.Matches(@"^(thisisareallyreallylongbutstillvalidagentnameiamusingforthi-[0-9]{4})$", serviceNameParts[3]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
private TestHostContext CreateTestContext([CallerMemberName] string testName = "")
|
||||
{
|
||||
@@ -211,4 +211,4 @@ namespace GitHub.Runner.Common.Tests
|
||||
return hc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace GitHub.Runner.Common.Tests
|
||||
typeof(IStepHost),
|
||||
typeof(IDiagnosticLogManager),
|
||||
typeof(IEnvironmentContextData),
|
||||
typeof(IHookArgs),
|
||||
typeof(IHookArgs),
|
||||
};
|
||||
Validate(
|
||||
assembly: typeof(IStepsRunner).GetTypeInfo().Assembly,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Runner.Sdk;
|
||||
using GitHub.Runner.Sdk;
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Runner.Sdk;
|
||||
using GitHub.Runner.Sdk;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using GitHub.Runner.Sdk;
|
||||
using Xunit;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Services.Common;
|
||||
using GitHub.Services.Common;
|
||||
using System;
|
||||
using Xunit;
|
||||
using GitHub.Runner.Sdk;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Runner.Common.Util;
|
||||
using GitHub.Runner.Common.Util;
|
||||
using GitHub.Runner.Sdk;
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -203,7 +203,7 @@ namespace GitHub.Runner.Common.Tests.Util
|
||||
File.CreateSymbolicLink(brokenSymlink, target);
|
||||
|
||||
// Act.
|
||||
var exception = Assert.Throws<FileNotFoundException>(()=>WhichUtil.Which(brokenSymlinkName, require: true, trace: trace));
|
||||
var exception = Assert.Throws<FileNotFoundException>(() => WhichUtil.Which(brokenSymlinkName, require: true, trace: trace));
|
||||
|
||||
// Assert
|
||||
Assert.Equal(brokenSymlinkName, exception.FileName);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
@@ -1005,7 +1005,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
};
|
||||
|
||||
//Act
|
||||
var result = await _actionManager.PrepareActionsAsync(_ec.Object, actions);
|
||||
var result = await _actionManager.PrepareActionsAsync(_ec.Object, actions);
|
||||
|
||||
//Assert
|
||||
Assert.Equal(2, result.ContainerSetupSteps.Count);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.DistributedTask.Expressions2;
|
||||
using GitHub.DistributedTask.Expressions2;
|
||||
using GitHub.DistributedTask.ObjectTemplating.Tokens;
|
||||
using GitHub.DistributedTask.Pipelines.ContextData;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.DistributedTask.Expressions2;
|
||||
using GitHub.DistributedTask.Expressions2;
|
||||
using GitHub.DistributedTask.ObjectTemplating.Tokens;
|
||||
using GitHub.DistributedTask.Pipelines;
|
||||
using GitHub.DistributedTask.Pipelines.ContextData;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.Runner.Worker;
|
||||
using GitHub.Runner.Worker;
|
||||
using GitHub.Runner.Worker.Container;
|
||||
using Xunit;
|
||||
using Moq;
|
||||
@@ -162,4 +162,4 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
containerOperationProvider.Initialize(_hc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using GitHub.DistributedTask.Expressions2;
|
||||
using GitHub.DistributedTask.ObjectTemplating;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using GitHub.Actions.RunService.WebApi;
|
||||
using GitHub.DistributedTask.Pipelines;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using GitHub.Runner.Worker;
|
||||
using GitHub.Services.WebApi;
|
||||
using Xunit;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.Runner.Worker;
|
||||
using Moq;
|
||||
using System;
|
||||
@@ -318,7 +318,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
|
||||
_message.ActionsEnvironment = new ActionsEnvironmentReference("production");
|
||||
|
||||
_jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded};
|
||||
_jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded };
|
||||
_jobEc.Initialize(hc);
|
||||
_jobEc.InitializeJob(_message, _tokenSource.Token);
|
||||
|
||||
@@ -328,7 +328,9 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
}
|
||||
}
|
||||
|
||||
[Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")]
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Worker")]
|
||||
public void EnsureFinalizeJobHandlesNullEnvironmentUrl()
|
||||
{
|
||||
using (TestHostContext hc = CreateTestContext())
|
||||
@@ -341,7 +343,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
Url = null
|
||||
};
|
||||
|
||||
_jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded};
|
||||
_jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded };
|
||||
_jobEc.Initialize(hc);
|
||||
_jobEc.InitializeJob(_message, _tokenSource.Token);
|
||||
|
||||
@@ -351,7 +353,9 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
}
|
||||
}
|
||||
|
||||
[Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")]
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Worker")]
|
||||
public void EnsureFinalizeJobHandlesNullEnvironment()
|
||||
{
|
||||
using (TestHostContext hc = CreateTestContext())
|
||||
@@ -361,7 +365,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
|
||||
_message.ActionsEnvironment = null;
|
||||
|
||||
_jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded};
|
||||
_jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded };
|
||||
_jobEc.Initialize(hc);
|
||||
_jobEc.InitializeJob(_message, _tokenSource.Token);
|
||||
|
||||
@@ -380,7 +384,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
Environment.SetEnvironmentVariable("ACTIONS_RUNNER_HOOK_JOB_STARTED", "/foo/bar");
|
||||
Environment.SetEnvironmentVariable("ACTIONS_RUNNER_HOOK_JOB_COMPLETED", "/bar/foo");
|
||||
using (TestHostContext hc = CreateTestContext())
|
||||
{
|
||||
{
|
||||
var jobExtension = new JobExtension();
|
||||
jobExtension.Initialize(hc);
|
||||
|
||||
@@ -396,7 +400,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
jobExtension.FinalizeJob(_jobEc, _message, DateTime.UtcNow);
|
||||
|
||||
Assert.Equal(Constants.Hooks.JobStartedStepName, hookStart.DisplayName);
|
||||
Assert.Equal(Constants.Hooks.JobCompletedStepName, (_jobEc.PostJobSteps.Last() as JobExtensionRunner).DisplayName);
|
||||
Assert.Equal(Constants.Hooks.JobCompletedStepName, (_jobEc.PostJobSteps.Last() as JobExtensionRunner).DisplayName);
|
||||
}
|
||||
|
||||
Environment.SetEnvironmentVariable("ACTIONS_RUNNER_HOOK_JOB_STARTED", null);
|
||||
@@ -415,7 +419,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
|
||||
_message.ActionsEnvironment = null;
|
||||
|
||||
_jobEc = new Runner.Worker.ExecutionContext {Result = TaskResult.Succeeded};
|
||||
_jobEc = new Runner.Worker.ExecutionContext { Result = TaskResult.Succeeded };
|
||||
_jobEc.Initialize(hc);
|
||||
_jobEc.InitializeJob(_message, _tokenSource.Token);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.Runner.Worker;
|
||||
using Moq;
|
||||
using System;
|
||||
@@ -89,16 +89,16 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
return hc;
|
||||
}
|
||||
|
||||
private Pipelines.AgentJobRequestMessage GetMessage(String messageType = JobRequestMessageTypes.PipelineAgentJobRequest, [CallerMemberName] String testName = "")
|
||||
private Pipelines.AgentJobRequestMessage GetMessage(String messageType = JobRequestMessageTypes.PipelineAgentJobRequest, [CallerMemberName] String testName = "")
|
||||
{
|
||||
TaskOrchestrationPlanReference plan = new();
|
||||
TimelineReference timeline = new Timeline(Guid.NewGuid());
|
||||
Guid jobId = Guid.NewGuid();
|
||||
var message = new Pipelines.AgentJobRequestMessage(
|
||||
plan,
|
||||
timeline,
|
||||
jobId,
|
||||
testName,
|
||||
plan,
|
||||
timeline,
|
||||
jobId,
|
||||
testName,
|
||||
testName, null, null, null, new Dictionary<string, VariableValue>(), new List<MaskHint>(), new Pipelines.JobResources(), new Pipelines.ContextData.DictionaryContextData(), new Pipelines.WorkspaceOptions(), new List<Pipelines.ActionStep>(), null, null, null, null,
|
||||
messageType: messageType);
|
||||
message.Variables[Constants.Variables.System.Culture] = "en-US";
|
||||
@@ -164,7 +164,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Worker")]
|
||||
public async Task WorksWithRunnerJobRequestMessageType()
|
||||
public async Task WorksWithRunnerJobRequestMessageType()
|
||||
{
|
||||
using (TestHostContext hc = CreateTestContext())
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
_trackingManager.Setup(x => x.LoadIfExists(_ec.Object, _trackingFile)).Returns(_existingConfig);
|
||||
|
||||
// Act.
|
||||
Assert.ThrowsAny<ArgumentException>(()=> _pipelineDirectoryManager.UpdateRepositoryDirectory(_ec.Object, "actions/notrunner", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work), "not_under_pipeline_directory"), false));
|
||||
Assert.ThrowsAny<ArgumentException>(() => _pipelineDirectoryManager.UpdateRepositoryDirectory(_ec.Object, "actions/notrunner", Path.Combine(hc.GetDirectory(WellKnownDirectory.Work), "not_under_pipeline_directory"), false));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.Runner.Worker;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
Reference in New Issue
Block a user