示例#1
0
 public void ServerConfigurationNoneSet()
 {
     WithEnvVarUnset(SiteNameKey, () =>
     {
         WithEnvVarUnset(AppPoolIdKey, () =>
             {
                 var config = new ServerConfiguration();
                 Assert.Null(config.ApplicationName);
                 Assert.Equal("git", config.GitServerRoot);
             });
     });
 }
示例#2
0
 public void ServerConfigurationAppPoolIdNameSet()
 {
     var rightValue = "right-" + Guid.NewGuid().ToString();
     WithEnvVarUnset(SiteNameKey, () =>
     {
         WithEnvVarSet(AppPoolIdKey, rightValue, () =>
         {
             var config = new ServerConfiguration();
             Assert.Equal(rightValue, config.ApplicationName);
             Assert.Equal(rightValue + ".git", config.GitServerRoot);
         });
     });
 }
示例#3
0
 public void ServerConfigurationWebSiteNameSet()
 {
     // WEBSITE_NAME overrides app pool_id
     var rightValue = "right-" + Guid.NewGuid().ToString();
     var wrongValue = "wrong-" + Guid.NewGuid().ToString();
     WithEnvVarSet(SiteNameKey, rightValue, () =>
     {
         WithEnvVarSet(AppPoolIdKey, wrongValue, () =>
         {
             var config = new ServerConfiguration();
             Assert.Equal(rightValue, config.ApplicationName);
             Assert.Equal(rightValue + ".git", config.GitServerRoot);
         });
     });
 }