Skip to content

Commit 4b802a8

Browse files
authored
Remove PublicApiTests.PublicApiHasNotChanged for Datadog.Trace.dll (#6385)
## Summary of changes Remove `PublicApiTests.PublicApiHasNotChanged` for Datadog.Trace.dll ## Reason for change The public API surface of Datadog.Trace is not _really_ public any more, as it's not directly referenced, so these tests are largely unneccessary. As of right now, `public` vs `internal` is essentially irrelevant in this project. ## Implementation details Remove the `PublicApiHasNotChanged` test. The other public API tests e.g. `AssemblyReferencesHaveNotChanged` _are_ still relevant, so jumped through some hoops to keep them ## Test coverage Slightly less now. ## Other details Part of stack - #6370 - #6376 - #6385 👈 This PR - #6386 - #6397 - #6399 - #6400 - #6405
1 parent 7ea288c commit 4b802a8

File tree

2 files changed

+11
-543
lines changed

2 files changed

+11
-543
lines changed

tracer/test/Datadog.Trace.Tests/PublicApiTests.cs

+11-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,20 @@
1616

1717
namespace Datadog.Trace.Tests.PublicApiTests
1818
{
19-
public class DatadogTraceTests : PublicApiTestsBase
19+
public class DatadogTraceTests
2020
{
21+
private readonly PublicApiTestsBase _base;
22+
2123
public DatadogTraceTests(ITestOutputHelper output)
22-
: base(typeof(Tracer).Assembly, output)
2324
{
25+
// We don't care about _all_ the public API tests (because this isn't _really_ public)
26+
// so working around it like this
27+
_base = new InternalBase(output);
2428
}
2529

30+
[Fact]
31+
public void AssemblyReferencesHaveNotChanged() => _base.AssemblyReferencesHaveNotChanged();
32+
2633
#if NETFRAMEWORK
2734
[Fact]
2835
public void ExposesTracingHttpModule()
@@ -31,6 +38,8 @@ public void ExposesTracingHttpModule()
3138
Assert.NotNull(httpModuleType);
3239
}
3340
#endif
41+
42+
private class InternalBase(ITestOutputHelper output) : PublicApiTestsBase(typeof(Tracer).Assembly, output);
3443
}
3544

3645
public class DatadogTraceAnnotationsTests : PublicApiTestsBase

0 commit comments

Comments
 (0)