Skip to content

E2E Deployment Test Failure: Aspire.Deployment.EndToEnd.Tests.AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.DeployTypeScriptApiWithCertManagerToAzureKubernetesEnvironment #17427

@mitchdenny

Description

@mitchdenny

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.tsapphost.mts (file path + comments + XML doc).

Affected Runs

This issue was created automatically by a workflow analyzing Deployment E2E test failures on main.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions