public static DeleteWebsite ( string name ) : void | ||
name | string | |
return | void |
public void Rollback_Website_Test() { var client = GetClient(); var request = new TriggerDeployment() { AppPoolName = "ZZZ_Integration_PoolName", AppPoolUser = "******", AppPoolPassword = "******", WebsiteName = "ZZZ_Integration_Website_Simple", AppRoot = "/", PackageId = "IntegrationTest", PackageVersion = "1.3.3.7", WebsitePhysicalPath = @"C:\temp\integrationtests", RuntimeVersion = RuntimeVersion.Version40, WebsitePort = 2000, }; client.PostFileWithRequest <TriggerDeploymentResponse>("/deployments", new FileInfo("src/PowerDeploy.IISDeployService.Tests/Files/package.zip".MapVcsRoot()), request).PrintDump(); request.PackageVersion = "1.3.3.8"; client.PostFileWithRequest <TriggerDeploymentResponse>("/deployments", new FileInfo("src/PowerDeploy.IISDeployService.Tests/Files/package.zip".MapVcsRoot()), request).PrintDump(); var rollbackRequest = new RollbackDeployment() { WebsiteName = request.WebsiteName, RollbackTarget = "{0}_v{1}".Fmt(request.PackageId, "1.3.3.7") }; client.Post(rollbackRequest); IISManagerTestBuddy.AssertWebsite(request.WebsiteName, Path.Combine(request.WebsitePhysicalPath, rollbackRequest.RollbackTarget), request.WebsitePort, request.AppPoolName); IISManagerTestBuddy.DeleteAppPool(request.AppPoolName); IISManagerTestBuddy.DeleteWebsite(request.WebsiteName); }
public void Trigger_Simple_Deployment_And_Check_AppPool_And_Website_Test() { var client = GetClient(); var request = new TriggerDeployment() { AppPoolName = "ZZZ_Integration_PoolName", AppPoolUser = "******", AppPoolPassword = "******", WebsiteName = "ZZZ_Integration_Website_Simple", AppRoot = "/", PackageId = "IntegrationTest", PackageVersion = "1.3.3.7", WebsitePhysicalPath = @"C:\temp\integrationtests", RuntimeVersion = RuntimeVersion.Version40, }; client.PostFileWithRequest <TriggerDeploymentResponse>("/deployments", new FileInfo("src/PowerDeploy.IISDeployService.Tests/Files/package.zip".MapVcsRoot()), request).PrintDump(); using (var manager = new ServerManager()) { Assert.IsNotNull(manager.ApplicationPools[request.AppPoolName]); Assert.AreEqual(request.AppPoolName, manager.ApplicationPools[request.AppPoolName].Name); Assert.AreEqual(request.AppPoolUser, manager.ApplicationPools[request.AppPoolName].ProcessModel.UserName); Assert.AreEqual(request.AppPoolPassword, manager.ApplicationPools[request.AppPoolName].ProcessModel.Password); Assert.IsNotNull(manager.Sites[request.WebsiteName]); Assert.AreEqual(Path.Combine(request.WebsitePhysicalPath, "{0}_v{1}".Fmt(request.PackageId, request.PackageVersion)), manager.Sites[request.WebsiteName].Applications["/"].VirtualDirectories["/"].PhysicalPath); } IISManagerTestBuddy.DeleteAppPool(request.AppPoolName); IISManagerTestBuddy.DeleteWebsite(request.WebsiteName); }
public void Create_Website_Test() { IISManagerTestBuddy.DeleteWebsite("UnitTestWebsite"); IISManagerTestBuddy.DeleteAppPool("UnitTestAppPool"); new IISManager().CreateWebsite("UnitTestWebsite", @"c:\temp", 80, "UnitTestAppPool"); IISManagerTestBuddy.AssertWebsite("UnitTestWebsite", @"c:\temp", 80, "UnitTestAppPool"); }