Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwest committed Dec 23, 2024
1 parent cd90339 commit 968bb60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ public SqlClientIntegrationTests(SqlClientIntegrationTestsFixture fixture)

[EnabledOnDockerPlatformTheory(EnabledOnDockerPlatformTheoryAttribute.DockerPlatform.Linux)]
[InlineData(CommandType.Text, "select 1/1")]
[InlineData(CommandType.Text, "select 1/1", true)]
[InlineData(CommandType.Text, "select 1/0", false, true)]
[InlineData(CommandType.Text, "select 1/0", false, true, false, false)]
[InlineData(CommandType.Text, "select 1/0", false, true, true, false)]
[InlineData(CommandType.StoredProcedure, "sp_who")]
[InlineData(CommandType.Text, "select 1/1", true, "select ?/?")]
[InlineData(CommandType.Text, "select 1/0", false, null, true)]
[InlineData(CommandType.Text, "select 1/0", false, null, true, false, false)]
[InlineData(CommandType.Text, "select 1/0", false, null, true, true, false)]
[InlineData(CommandType.StoredProcedure, "sp_who", false, "sp_who")]
public void SuccessfulCommandTest(
CommandType commandType,
string commandText,
bool captureTextCommandContent = false,
string? sanitizedCommandText = null,
bool isFailure = false,
bool recordException = false,
bool shouldEnrich = true)
Expand Down Expand Up @@ -84,7 +85,7 @@ public void SuccessfulCommandTest(
Assert.Single(activities);
var activity = activities[0];

SqlClientTests.VerifyActivityData(commandType, commandText, captureTextCommandContent, isFailure, recordException, shouldEnrich, activity);
SqlClientTests.VerifyActivityData(commandType, sanitizedCommandText, captureTextCommandContent, isFailure, recordException, shouldEnrich, activity);
SqlClientTests.VerifySamplingParameters(sampler.LatestSamplingParameters);

if (isFailure)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public void ShouldNotCollectTelemetryAndShouldNotPropagateExceptionWhenFilterThr

internal static void VerifyActivityData(
CommandType commandType,
string commandText,
string? commandText,
bool captureTextCommandContent,
bool isFailure,
bool recordException,
Expand Down

0 comments on commit 968bb60

Please sign in to comment.