mirror of
https://github.com/actions/runner.git
synced 2025-12-11 04:46:58 +00:00
remove test asserting thrown exception
This commit is contained in:
@@ -12,7 +12,6 @@ using System;
|
||||
namespace GitHub.Runner.Common.Tests.Worker
|
||||
{
|
||||
|
||||
[Collection("Sequential")]
|
||||
public sealed class ContainerOperationProviderL0
|
||||
{
|
||||
|
||||
@@ -29,20 +28,6 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
|
||||
List<ContainerInfo> containers = new List<ContainerInfo>();
|
||||
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Worker")]
|
||||
public async void RunServiceContainersHealthcheck_UnhealthyServiceContainer_AssertExceptionThrown()
|
||||
{
|
||||
//Arrange
|
||||
Setup();
|
||||
_dockerManager.Setup(x => x.DockerInspect(_ec.Object, It.IsAny<string>(), It.IsAny<string>())).Returns(Task.FromResult(unhealthyDockerStatus));
|
||||
|
||||
//Act and Assert
|
||||
await Assert.ThrowsAsync<InvalidOperationException>(() => containerOperationProvider.RunContainersHealthcheck(_ec.Object, containers));
|
||||
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Level", "L0")]
|
||||
[Trait("Category", "Worker")]
|
||||
@@ -58,11 +43,11 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
await containerOperationProvider.RunContainersHealthcheck(_ec.Object, containers);
|
||||
|
||||
}
|
||||
catch (InvalidOperationException) { }
|
||||
|
||||
catch (InvalidOperationException) {
|
||||
|
||||
//Assert
|
||||
Assert.Equal(TaskResult.Failed, _ec.Object.Result ?? TaskResult.Failed);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user