public void ServerConfigurationNoneSet() { WithEnvVarUnset(SiteNameKey, () => { WithEnvVarUnset(AppPoolIdKey, () => { var config = new ServerConfiguration(); Assert.Null(config.ApplicationName); Assert.Equal("git", config.GitServerRoot); }); }); }
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); }); }); }
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); }); }); }