public async Task AppOfflineDropped_CanRemoveAppOfflineAfterAddingAndSiteWorks(HostingModel hostingModel) { var deploymentResult = await DeployApp(hostingModel); AddAppOffline(deploymentResult.ContentRoot); await AssertAppOffline(deploymentResult); RemoveAppOffline(deploymentResult.ContentRoot); await AssertRunning(deploymentResult); }
private async Task <IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) { var deploymentParameters = _fixture.GetBaseDeploymentParameters(hostingModel: hostingModel); return(await DeployAsync(deploymentParameters)); }
public string GetHostUrl(HostingModel hostingModel) { return(this.SampleSites[hostingModel].GetUrl()); }
private async Task UpgradeFeatureDetectionDeployer(bool disableWebSocket, string expected, HostingModel hostingModel) { var deploymentParameters = Fixture.GetBaseDeploymentParameters(hostingModel); if (disableWebSocket) { // For IIS, we need to modify the apphost.config file deploymentParameters.AddServerConfigAction( element => element.Descendants("webSocket") .Single() .SetAttributeValue("enabled", "false")); } var deploymentResult = await DeployAsync(deploymentParameters); var response = await deploymentResult.HttpClient.GetAsync("UpgradeFeatureDetection"); var responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(expected, responseText); }
public WCFClientTestBase(ConsoleDynamicMethodFixtureFWLatest fixture, ITestOutputHelper output, WCFBindingType bindingToTest, TracingTestOption tracingTestOption, HostingModel hostingTestOption, ASPCompatibilityMode aspCompatModeOption, IWCFLogHelpers logHelpersImpl) : base(fixture, output, bindingToTest, _instrumentedClientInvocMethods, new[] { WCFInvocationMethod.Sync }, tracingTestOption, hostingTestOption, aspCompatModeOption, logHelpersImpl) { }
public void StartHost(HostingModel hostingModel) { this.SampleSites[hostingModel].Start(); }
public IISDeploymentParameters GetBaseDeploymentParameters(ApplicationPublisher publisher, HostingModel hostingModel = HostingModel.InProcess, bool publish = false) { return(GetBaseDeploymentParameters( publisher, new DeploymentParameters(publisher.ApplicationPath, DeployerSelector.ServerType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { HostingModel = hostingModel, TargetFramework = Tfm.NetCoreApp30, AncmVersion = AncmVersion.AspNetCoreModuleV2 }, publish)); }
public async Task AppOfflineDroppedWhileSiteFailedToStartInShim_AppOfflineServed(HostingModel hostingModel, int statusCode, string content) { var deploymentParameters = Fixture.GetBaseDeploymentParameters(hostingModel: hostingModel); deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent")); var deploymentResult = await DeployAsync(deploymentParameters); var result = await deploymentResult.HttpClient.GetAsync("/"); Assert.Equal(statusCode, (int)result.StatusCode); Assert.Contains(content, await result.Content.ReadAsStringAsync()); AddAppOffline(deploymentResult.ContentRoot); await AssertAppOffline(deploymentResult); DeletePublishOutput(deploymentResult); }
public IISDeploymentParameters GetBaseDeploymentParameters(HostingModel hostingModel = HostingModel.InProcess, bool publish = false) { var publisher = hostingModel == HostingModel.InProcess ? InProcessTestSite : OutOfProcessTestSite; return(GetBaseDeploymentParameters(publisher, hostingModel, publish)); }
private async Task <IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) { var deploymentParameters = Helpers.GetBaseDeploymentParameters(hostingModel: hostingModel, publish: true); return(await DeployAsync(deploymentParameters)); }
// Defaults to inprocess specific deployment parameters public static IISDeploymentParameters GetBaseDeploymentParameters(string site = null, HostingModel hostingModel = HostingModel.InProcess, bool publish = false) { if (site == null) { site = hostingModel == HostingModel.InProcess ? "InProcessWebSite" : "OutOfProcessWebSite"; } return(new IISDeploymentParameters(GetTestWebSitePath(site), DeployerSelector.ServerType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { TargetFramework = Tfm.NetCoreApp22, ApplicationType = ApplicationType.Portable, AncmVersion = AncmVersion.AspNetCoreModuleV2, HostingModel = hostingModel, PublishApplicationBeforeDeployment = publish, }); }
private async Task UpgradeFeatureDetectionDeployer(bool disableWebSocket, string sitePath, string expected, HostingModel hostingModel) { var deploymentParameters = new DeploymentParameters(sitePath, DeployerSelector.ServerType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { TargetFramework = Tfm.NetCoreApp22, ApplicationType = ApplicationType.Portable, AncmVersion = AncmVersion.AspNetCoreModuleV2, HostingModel = hostingModel, PublishApplicationBeforeDeployment = hostingModel == HostingModel.InProcess }; if (disableWebSocket) { // For IIS, we need to modify the apphost.config file deploymentParameters.ServerConfigTemplateContent = GetServerConfig( element => element.Descendants("webSocket") .Single() .SetAttributeValue("enabled", "false")); } var deploymentResult = await DeployAsync(deploymentParameters); var response = await deploymentResult.RetryingHttpClient.GetAsync("UpgradeFeatureDetection"); var responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(expected, responseText); }
public IISDeploymentParameters GetBaseDeploymentParameters(ApplicationPublisher publisher, HostingModel hostingModel = HostingModel.InProcess) { return(GetBaseDeploymentParameters( publisher, new DeploymentParameters() { ServerType = DeployerSelector.ServerType, RuntimeFlavor = RuntimeFlavor.CoreClr, RuntimeArchitecture = RuntimeArchitecture.x64, HostingModel = hostingModel, TargetFramework = Tfm.NetCoreApp31 })); }