Ejemplo n.º 1
0
        public async Task ReportsWebConfigAuthoringErrors(string scenario)
        {
            var(expectedError, action) = InvalidConfigTransformations[scenario];
            var iisDeploymentParameters = Fixture.GetBaseDeploymentParameters();

            iisDeploymentParameters.WebConfigActionList.Add((element, _) => action(element));
            var deploymentResult = await DeployAsync(iisDeploymentParameters);

            var result = await deploymentResult.HttpClient.GetAsync("/HelloWorld");

            Assert.Equal(HttpStatusCode.InternalServerError, result.StatusCode);

            // Config load errors might not allow us to initialize log file
            deploymentResult.AllowNoLogs();

            StopServer();

            EventLogHelpers.VerifyEventLogEvents(deploymentResult,
                                                 EventLogHelpers.ConfigurationLoadError(deploymentResult, expectedError)
                                                 );
        }