Skip to content

Commit

Permalink
Update SQS snapshots to support latest package versions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlock committed Nov 22, 2023
1 parent f706c80 commit 6a0d261
Show file tree
Hide file tree
Showing 9 changed files with 5,345 additions and 181 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers
var host = Environment.GetEnvironmentVariable("AWS_SDK_HOST");

var settings = VerifyHelper.GetSpanVerifierSettings();
settings.UseFileName($"{nameof(AwsSqsTests)}.{frameworkName}.Schema{metadataSchemaVersion.ToUpper()}");
var suffix = GetSnapshotSuffix(packageVersion);

settings.UseFileName($"{nameof(AwsSqsTests)}.{frameworkName}.Schema{metadataSchemaVersion.ToUpper()}{suffix}");
settings.AddSimpleScrubber("out.host: localhost", "out.host: aws_sqs");
settings.AddSimpleScrubber("out.host: localstack", "out.host: aws_sqs");
settings.AddSimpleScrubber("out.host: localstack_arm64", "out.host: aws_sqs");
Expand All @@ -94,6 +96,14 @@ public async Task SubmitsTraces(string packageVersion, string metadataSchemaVers
await VerifyHelper.VerifySpans(spans, settings);

telemetry.AssertIntegrationEnabled(IntegrationId.AwsSqs);

static string GetSnapshotSuffix(string packageVersion)
=> packageVersion switch
{
null or "" => ".pre3_7_300",
{ } v when new Version(v) < new Version("3.7.300.6") => ".pre3_7_300",
_ => string.Empty
};
}
}
}
Expand Down
Loading

0 comments on commit 6a0d261

Please sign in to comment.