Ejemplo n.º 1
0
    public async Task InvalidFilePathForLogs_ServerStillRuns(TestVariant variant)
    {
        var deploymentParameters = Fixture.GetBaseDeploymentParameters(variant);

        deploymentParameters.WebConfigActionList.Add(
            WebConfigHelpers.AddOrModifyAspNetCoreSection("stdoutLogEnabled", "true"));
        deploymentParameters.WebConfigActionList.Add(
            WebConfigHelpers.AddOrModifyAspNetCoreSection("stdoutLogFile", Path.Combine("Q:", "std")));

        var deploymentResult = await DeployAsync(deploymentParameters);

        await Helpers.AssertStarts(deploymentResult, "HelloWorld");

        StopServer();
        if (variant.HostingModel == HostingModel.InProcess)
        {
            // Error is getting logged twice, from shim and handler
            EventLogHelpers.VerifyEventLogEvent(deploymentResult, EventLogHelpers.CouldNotStartStdoutFileRedirection("Q:\\std", deploymentResult), Logger, allowMultiple: true);
        }
    }