public void AssertThatApplicationIsNotRunning(AppIdentity appIdentity) { IApplicationPool applicationPool = _yamsDiModule.Container.Resolve <IApplicationPool>(); Assert.False(applicationPool.HasApplication(appIdentity), $"App {appIdentity} should not be running!"); Assert.False(Directory.Exists(Path.Combine(_applicationsInstallPath, ApplicationUtils.GetApplicationRelativePath(appIdentity)))); }
public void AssertThatApplicationIsNotRunning(AppIdentity appIdentity) { IApplicationPool applicationPool = _diContainer.Resolve <IApplicationPool>(); Assert.IsFalse(applicationPool.HasApplication(appIdentity), string.Format("App {0} should not be running!", appIdentity)); Assert.IsFalse(Directory.Exists(Path.Combine(_applicationsInstallPath, ApplicationUtils.GetApplicationRelativePath(appIdentity)))); }
public async Task DownloadApplication(AppIdentity appIdentity) { try { string destPath = Path.Combine(_applicationRootPath, ApplicationUtils.GetApplicationRelativePath(appIdentity)); await _deploymentRepository.DownloadApplicationBinaries(appIdentity, destPath, ConflictResolutionMode.OverwriteExistingBinaries); } catch (BinariesNotFoundException) { Trace.TraceError( $"{appIdentity} could not be downloaded because it was not found in the Yams repository"); } }
public async Task DownloadApplication(AppIdentity appIdentity) { IRemoteDirectory appDeploymentDir = await _deploymentsRootDirectory.GetDirectory(appIdentity.Id); if (await appDeploymentDir.Exists()) { IRemoteDirectory versionDir = await appDeploymentDir.GetDirectory(appIdentity.Version.ToString()); if (await versionDir.Exists()) { await versionDir.Download(Path.Combine(_applicationRootPath, ApplicationUtils.GetApplicationRelativePath(appIdentity))); } return; } Trace.TraceError("{0} could not be downloaded because it was not found in the blob storage", appIdentity); }
public static string GetTestApplicationOutput(string applicationRootPath, AppIdentity appIdentity, string exeName) { string processOutputPath = Path.Combine(Path.Combine(applicationRootPath, ApplicationUtils.GetApplicationRelativePath(appIdentity)), $"{exeName}.exe.out"); int maxRetry = 10; while (maxRetry-- > 0) { Thread.Sleep(100); if (File.Exists(processOutputPath)) { break; } } using (StreamReader reader = new StreamReader(processOutputPath)) { return(reader.ReadToEnd()); } }
private string GetApplicationAbsolutePath(AppIdentity appIdentity) { return(Path.Combine(_applicationsRootPath, ApplicationUtils.GetApplicationRelativePath(appIdentity))); }