Skip to content

Commit

Permalink
chore: merge upstream/develop into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lgcmotta committed Jan 22, 2025
2 parents a4ef713 + 888da44 commit 791f694
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/Testcontainers.Databases.Tests/DatabasesContainerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ public static TheoryData<Type> GetContainerImplementations(bool expectDataProvid

foreach (var testAssembly in testAssemblies)
{
var testAssemblyName = testAssembly.Key.GetName().Name;

// TODO: If a module contains multiple container implementations, it would require all container implementations to implement the interface.
foreach (var containerType in testAssembly.Value.Where(type => type.IsAssignableTo(typeof(IContainer))))
{
var typeAssemblyName = containerType.Assembly.GetName().Name;
var testAssemblyName = testAssembly.Key.GetName().Name!;

var containerTypeAssemblyName = containerType.Assembly.GetName().Name!;

if (!string.IsNullOrWhiteSpace(testAssemblyName) && !string.IsNullOrWhiteSpace(typeAssemblyName) && !testAssemblyName.Contains(typeAssemblyName))
// If a module utilizes another one of our modules, do not include the container type
// if it does not belong to the actual module. For example, the ServiceBus module
// utilizes the MsSql module. We do not want to include the MsSqlContainer type
// twice or place it in the wrong test.
if (!testAssemblyName.Contains(containerTypeAssemblyName, StringComparison.OrdinalIgnoreCase))
{
continue;
}
Expand Down

0 comments on commit 791f694

Please sign in to comment.