Skip to content

Commit 9b308ae

Browse files
committed
Improve test error message
1 parent d60bb93 commit 9b308ae

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Libraries/test/Amazon.Lambda.RuntimeSupport.Tests/Amazon.Lambda.RuntimeSupport.IntegrationTests/BaseCustomRuntimeTest.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,16 @@ private string GetDeploymentZipPath()
351351

352352
if (!File.Exists(deploymentZipFile))
353353
{
354-
throw new NoDeploymentPackageFoundException();
354+
var message = new StringBuilder();
355+
message.AppendLine($"Deployment package not found at expected path: {deploymentZipFile}");
356+
message.AppendLine("Available Test Bundles:");
357+
foreach (var kvp in _fixture.TestAppPaths)
358+
{
359+
message.AppendLine($"{kvp.Key}: {kvp.Value}");
360+
}
361+
362+
363+
throw new NoDeploymentPackageFoundException(message.ToString());
355364
}
356365

357366
return deploymentZipFile;
@@ -380,7 +389,9 @@ private static string FindUp(string path, string fileOrDirectoryName, bool combi
380389

381390
protected class NoDeploymentPackageFoundException : Exception
382391
{
392+
public NoDeploymentPackageFoundException() { }
383393

394+
public NoDeploymentPackageFoundException(string message) : base(message) { }
384395
}
385396

386397
private ApplicationLogLevel ConvertRuntimeLogLevel(RuntimeLogLevel runtimeLogLevel)

0 commit comments

Comments
 (0)