-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNpqsqlTests.cs
38 lines (31 loc) · 1008 Bytes
/
NpqsqlTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
using IntegrationTests.Helpers;
using Xunit.Abstractions;
namespace IntegrationTests;
[Collection(PostgresCollection.Name)]
public class NpqsqlTests : TestHelper
{
private readonly PostgresFixture _postgres;
public NpqsqlTests(ITestOutputHelper output, PostgresFixture postgres)
: base("Npgsql", output)
{
_postgres = postgres;
}
[Theory]
[Trait("Category", "EndToEnd")]
[Trait("Containers", "Linux")]
[MemberData(nameof(LibraryVersion.Npgsql), MemberType = typeof(LibraryVersion))]
public void SubmitsTraces(string packageVersion)
{
using var collector = new MockSpansCollector(Output);
SetExporter(collector);
collector.Expect("Npgsql");
RunTestApplication(new()
{
Arguments = $"--postgres {_postgres.Port}",
PackageVersion = packageVersion
});
collector.AssertExpectations();
}
}