This commit is contained in:
TingluoHuang
2020-03-22 22:37:23 -04:00
parent 502b9f06f2
commit 738602ee55
3 changed files with 9 additions and 47 deletions

View File

@@ -659,50 +659,9 @@ namespace GitHub.Runner.Common.Tests.Worker
{
await _actionManager.PrepareActionsAsync(_ec.Object, actions);
}
catch (NotSupportedException e)
catch (ArgumentNullException e)
{
Assert.Contains("`pre` or `main` is required for an actions.", e.Message);
}
}
finally
{
Teardown();
}
}
[Fact]
[Trait("Level", "L0")]
[Trait("Category", "Worker")]
public async void PrepareActions_RepositoryActionWithInvalidWrapperActionfile_Docker()
{
try
{
//Arrange
Setup();
var actionId = Guid.NewGuid();
var actions = new List<Pipelines.ActionStep>
{
new Pipelines.ActionStep()
{
Name = "action",
Id = actionId,
Reference = new Pipelines.RepositoryPathReference()
{
Name = "TingluoHuang/runner_L0",
Ref = "RepositoryActionWithInvalidWrapperActionfile_Docker",
RepositoryType = "GitHub"
}
}
};
//Act
try
{
await _actionManager.PrepareActionsAsync(_ec.Object, actions);
}
catch (NotSupportedException e)
{
Assert.Contains("`pre` or `main` is required for an actions.", e.Message);
Assert.Contains("Entry javascript fils is not provided.", e.Message);
}
}
finally