Failing Test
Aspire.Deployment.EndToEnd.Tests.AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.DeployTypeScriptApiWithCertManagerToAzureKubernetesEnvironment
Symptom
System.IO.FileNotFoundException : Could not find file
'/tmp/Aspire.Cli.Tests/TemporaryWorkspaces/<guid>/AksCertManagerTs/apphost.ts'.
Thrown at tests/Aspire.Deployment.EndToEnd.Tests/AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs:136 inside File.ReadAllText(appHostFilePath).
Root Cause
The test (and its XML doc on line 132) hard-codes the AppHost path as apphost.ts:
var appHostFilePath = Path.Combine(projectDir, "apphost.ts");
However, since PR #16984 ("Use mts for TypeScript AppHosts"), the TypeScript starter template emits apphost.mts instead of apphost.ts. See CliTemplateFactory.TypeScriptStarterTemplate.cs#L75:
var appHostProject = _projectFactory.TryGetProject(new FileInfo(Path.Combine(outputPath, "apphost.mts")));
So the test's File.ReadAllText immediately fails because apphost.ts does not exist in the created project.
Fix
Rename the test's references to apphost.ts → apphost.mts (file path + comments + XML doc).
Affected Runs
This issue was created automatically by a workflow analyzing Deployment E2E test failures on main.
Failing Test
Aspire.Deployment.EndToEnd.Tests.AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.DeployTypeScriptApiWithCertManagerToAzureKubernetesEnvironmentSymptom
Thrown at
tests/Aspire.Deployment.EndToEnd.Tests/AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs:136insideFile.ReadAllText(appHostFilePath).Root Cause
The test (and its XML doc on line 132) hard-codes the AppHost path as
apphost.ts:However, since PR #16984 ("Use mts for TypeScript AppHosts"), the TypeScript starter template emits
apphost.mtsinstead ofapphost.ts. SeeCliTemplateFactory.TypeScriptStarterTemplate.cs#L75:So the test's
File.ReadAllTextimmediately fails becauseapphost.tsdoes not exist in the created project.Fix
Rename the test's references to
apphost.ts→apphost.mts(file path + comments + XML doc).Affected Runs