Permalink
Browse files

Fix the TestGeneratorSiteBuilderFactory flag which controls whether t…

…o run the original or new deployment logic, it wouldn't work when reusing sites.
  • Loading branch information...
1 parent 21470bb commit 13a7843653ad40e245d8016ebe49756f53648272 Amit Apple committed Jan 17, 2013
Showing with 11 additions and 11 deletions.
  1. +11 −11 Kudu.TestHarness/ApplicationManager.cs
@@ -124,6 +124,16 @@ public static void Run(string applicationName, Action<ApplicationManager> action
appManager.VfsWebRootManager.WriteAllText("index.html", "<h1>This web site has been successfully created</h1>");
}
+ const string siteBuilderFactory = "site_builder_factory";
+ if (KuduUtils.TestGeneratorSiteBuilderFactory)
+ {
+ appManager.SettingsManager.SetValue(siteBuilderFactory, "generator").Wait();
+ }
+ else
+ {
+ appManager.SettingsManager.Delete(siteBuilderFactory).Wait();
+ }
+
var dumpPath = Path.Combine(PathHelper.TestResultsPath, applicationName, applicationName + ".zip");
try
{
@@ -166,7 +176,7 @@ private static IDisposable StartLogStream(ApplicationManager appManager)
if (Debugger.IsAttached)
{
// Set to verbose level
- appManager.SettingsManager.SetValue("trace_level", "4");
+ appManager.SettingsManager.SetValue("trace_level", "4").Wait();
RemoteLogStreamManager mgr = appManager.CreateLogStreamManager("Git");
waitHandle = new LogStreamWaitHandle(mgr.GetStream().Result);
@@ -256,16 +266,6 @@ public static ApplicationManager CreateApplication(string applicationName)
RepositoryManager = repositoryManager,
};
- const string siteBuilderFactory = "site_builder_factory";
- if (KuduUtils.TestGeneratorSiteBuilderFactory)
- {
- applicationManager.SettingsManager.SetValue(siteBuilderFactory, "generator").Wait();
- }
- else
- {
- applicationManager.SettingsManager.Delete(siteBuilderFactory).Wait();
- }
-
return applicationManager;
}

0 comments on commit 13a7843

Please sign in to comment.