From b15c82cd091d0ccdabe781e2d7cf11be55a9af44 Mon Sep 17 00:00:00 2001 From: Flavien Darche <11708575+e-n-0@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:36:13 +0000 Subject: [PATCH] [ASM] Skip integration tests Microsoft.Data.Sqlite on net 3.0 (#6342) ## Summary of changes Skip integration tests using `Microsoft.Data.Sqlite` on `netcoreapp3.0`. ## Reason for change On the CI, the tests using the sqlite databse using `Microsoft.Data.Sqlite` on `netcoreapp3.0` were failing. --- .../IAST/AspNetCore5IastTests.cs | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tracer/test/Datadog.Trace.Security.IntegrationTests/IAST/AspNetCore5IastTests.cs b/tracer/test/Datadog.Trace.Security.IntegrationTests/IAST/AspNetCore5IastTests.cs index df41591988ac..dca2ef7fb1b8 100644 --- a/tracer/test/Datadog.Trace.Security.IntegrationTests/IAST/AspNetCore5IastTests.cs +++ b/tracer/test/Datadog.Trace.Security.IntegrationTests/IAST/AspNetCore5IastTests.cs @@ -227,8 +227,15 @@ await VerifyHelper.VerifySpans(spansFiltered, settings) [InlineData("Microsoft.Data.Sqlite")] public async Task TestIastStoredXssRequest(string database) { - var filename = "Iast.StoredXss.AspNetCore5." + (IastEnabled ? "IastEnabled" : "IastDisabled"); var useMicrosoftDataDb = database == "Microsoft.Data.Sqlite"; +#if NETCOREAPP3_0 + if (useMicrosoftDataDb && EnvironmentHelper.IsAlpine()) + { + throw new SkipException(); + } +#endif + + var filename = "Iast.StoredXss.AspNetCore5." + (IastEnabled ? "IastEnabled" : "IastDisabled"); if (RedactionEnabled is true) { filename += ".RedactionEnabled"; } var url = $"/Iast/StoredXss?param=RawValue&useMicrosoftDataDb={useMicrosoftDataDb}"; IncludeAllHttpSpans = true; @@ -255,8 +262,15 @@ await VerifyHelper.VerifySpans(spansFiltered, settings) [InlineData("Microsoft.Data.Sqlite")] public async Task TestIastStoredXssEscapedRequest(string database) { - var filename = "Iast.StoredXssEscaped.AspNetCore5." + (IastEnabled ? "IastEnabled" : "IastDisabled"); var useMicrosoftDataDb = database == "Microsoft.Data.Sqlite"; +#if NETCOREAPP3_0 + if (useMicrosoftDataDb && EnvironmentHelper.IsAlpine()) + { + throw new SkipException(); + } +#endif + + var filename = "Iast.StoredXssEscaped.AspNetCore5." + (IastEnabled ? "IastEnabled" : "IastDisabled"); var url = $"/Iast/StoredXssEscaped?useMicrosoftDataDb={useMicrosoftDataDb}"; IncludeAllHttpSpans = true; await TryStartApp(); @@ -282,8 +296,15 @@ await VerifyHelper.VerifySpans(spansFiltered, settings) [InlineData("Microsoft.Data.Sqlite")] public async Task TestIastStoredSqliRequest(string database) { - var filename = "Iast.StoredSqli.AspNetCore5." + (IastEnabled ? "IastEnabled" : "IastDisabled"); var useMicrosoftDataDb = database == "Microsoft.Data.Sqlite"; +#if NETCOREAPP3_0 + if (useMicrosoftDataDb && EnvironmentHelper.IsAlpine()) + { + throw new SkipException(); + } +#endif + + var filename = "Iast.StoredSqli.AspNetCore5." + (IastEnabled ? "IastEnabled" : "IastDisabled"); var url = $"/Iast/StoredSqli?useMicrosoftDataDb={useMicrosoftDataDb}"; IncludeAllHttpSpans = true; await TryStartApp();