|
@@ -17,21 +17,12 @@ namespace ApplicationInsightsJavaScriptSnippetTest
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task DefaultAILogFiltersApplied_ForNetCoreApp20_Portable() => DefaultAILogFiltersApplied("netcoreapp2.0", ApplicationType.Portable);
|
|
|
|
|
-
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task DefaultAILogFiltersApplied_ForNetCoreApp20_Standalone() => DefaultAILogFiltersApplied("netcoreapp2.0", ApplicationType.Standalone);
|
|
|
|
|
-
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task DefaultAILogFiltersApplied_ForNetCoreApp21_Portable() => DefaultAILogFiltersApplied("netcoreapp2.1", ApplicationType.Portable);
|
|
|
|
|
-
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task DefaultAILogFiltersApplied_ForNetCoreApp21_Standalone() => DefaultAILogFiltersApplied("netcoreapp2.1", ApplicationType.Standalone);
|
|
|
|
|
-
|
|
|
|
|
- private async Task DefaultAILogFiltersApplied(string targetFramework, ApplicationType applicationType)
|
|
|
|
|
|
|
+ [Theory]
|
|
|
|
|
+ [InlineData(ApplicationType.Portable)]
|
|
|
|
|
+ [InlineData(ApplicationType.Standalone)]
|
|
|
|
|
+ public async Task DefaultAILogFiltersApplied(ApplicationType applicationType)
|
|
|
{
|
|
{
|
|
|
- var responseText = await RunRequest(targetFramework, applicationType, "DefaultLogging");
|
|
|
|
|
|
|
+ var responseText = await RunRequest(applicationType, "DefaultLogging");
|
|
|
|
|
|
|
|
// Enabled by default
|
|
// Enabled by default
|
|
|
Assert.Contains("System warning log", responseText);
|
|
Assert.Contains("System warning log", responseText);
|
|
@@ -62,21 +53,12 @@ namespace ApplicationInsightsJavaScriptSnippetTest
|
|
|
Assert.Contains("Specific trace log", responseText);
|
|
Assert.Contains("Specific trace log", responseText);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task CustomAILogFiltersApplied_ForNetCoreApp20_Portable() => CustomAILogFiltersApplied("netcoreapp2.0", ApplicationType.Portable);
|
|
|
|
|
-
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task CustomAILogFiltersApplied_ForNetCoreApp20_Standalone() => CustomAILogFiltersApplied("netcoreapp2.0", ApplicationType.Standalone);
|
|
|
|
|
-
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task CustomAILogFiltersApplied_ForNetCoreApp21_Portable() => CustomAILogFiltersApplied("netcoreapp2.1", ApplicationType.Portable);
|
|
|
|
|
-
|
|
|
|
|
- [Fact]
|
|
|
|
|
- public Task CustomAILogFiltersApplied_ForNetCoreApp21_Standalone() => CustomAILogFiltersApplied("netcoreapp2.1", ApplicationType.Standalone);
|
|
|
|
|
-
|
|
|
|
|
- private async Task CustomAILogFiltersApplied(string targetFramework, ApplicationType applicationType)
|
|
|
|
|
|
|
+ [Theory]
|
|
|
|
|
+ [InlineData(ApplicationType.Portable)]
|
|
|
|
|
+ [InlineData(ApplicationType.Standalone)]
|
|
|
|
|
+ public async Task CustomAILogFiltersApplied(ApplicationType applicationType)
|
|
|
{
|
|
{
|
|
|
- var responseText = await RunRequest(targetFramework, applicationType, "CustomLogging");
|
|
|
|
|
|
|
+ var responseText = await RunRequest(applicationType, "CustomLogging");
|
|
|
// Custom logger allows only namespaces with 'o' in the name
|
|
// Custom logger allows only namespaces with 'o' in the name
|
|
|
|
|
|
|
|
Assert.DoesNotContain("System warning log", responseText);
|
|
Assert.DoesNotContain("System warning log", responseText);
|
|
@@ -99,7 +81,7 @@ namespace ApplicationInsightsJavaScriptSnippetTest
|
|
|
Assert.DoesNotContain("Specific trace log", responseText);
|
|
Assert.DoesNotContain("Specific trace log", responseText);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private async Task<string> RunRequest(string targetFramework, ApplicationType applicationType, string environment)
|
|
|
|
|
|
|
+ private async Task<string> RunRequest(ApplicationType applicationType, string environment)
|
|
|
{
|
|
{
|
|
|
string responseText;
|
|
string responseText;
|
|
|
var testName = $"ApplicationInsightsLoggingTest_{applicationType}";
|
|
var testName = $"ApplicationInsightsLoggingTest_{applicationType}";
|
|
@@ -111,7 +93,7 @@ namespace ApplicationInsightsJavaScriptSnippetTest
|
|
|
{
|
|
{
|
|
|
PublishApplicationBeforeDeployment = true,
|
|
PublishApplicationBeforeDeployment = true,
|
|
|
PreservePublishedApplicationForDebugging = PreservePublishedApplicationForDebugging,
|
|
PreservePublishedApplicationForDebugging = PreservePublishedApplicationForDebugging,
|
|
|
- TargetFramework = "netcoreapp2.0",
|
|
|
|
|
|
|
+ TargetFramework = "netcoreapp2.2",
|
|
|
Configuration = GetCurrentBuildConfiguration(),
|
|
Configuration = GetCurrentBuildConfiguration(),
|
|
|
ApplicationType = applicationType,
|
|
ApplicationType = applicationType,
|
|
|
EnvironmentName = environment,
|
|
EnvironmentName = environment,
|