Skip to content

Commit

Permalink
Update packages with minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cagrin committed Sep 19, 2024
1 parent e1a55cc commit f801b77
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 88 deletions.
22 changes: 11 additions & 11 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
<PackageVersion Include="coverlet.collector" Version="6.0.2"/>
<PackageVersion Include="coverlet.msbuild" Version="6.0.2"/>
<PackageVersion Include="Dapper" Version="2.1.35"/>
<PackageVersion Include="LikeComparison" Version="2.2.0"/>
<PackageVersion Include="LikeComparison.MSTest" Version="2.2.0"/>
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.1"/>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
<PackageVersion Include="LikeComparison" Version="2.2.1"/>
<PackageVersion Include="LikeComparison.MSTest" Version="2.2.1"/>
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2"/>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0"/>
<PackageVersion Include="Moq" Version="4.20.70"/>
<PackageVersion Include="MSTest.Analyzers" Version="3.4.3"/>
<PackageVersion Include="MSTest.TestAdapter" Version="3.4.3"/>
<PackageVersion Include="MSTest.TestFramework" Version="3.4.3"/>
<PackageVersion Include="Moq" Version="4.20.72"/>
<PackageVersion Include="MSTest.Analyzers" Version="3.6.0"/>
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.0"/>
<PackageVersion Include="MSTest.TestFramework" Version="3.6.0"/>
<PackageVersion Include="SQLCoverLib" Version="0.6.0-preview6"/>
<PackageVersion Include="Shouldly" Version="4.2.1"/>
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556"/>
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
<PackageVersion Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="Testcontainers" Version="3.9.0"/>
<PackageVersion Include="Testcontainers.MsSql" Version="3.9.0"/>
<PackageVersion Include="Testcontainers.SqlEdge" Version="3.9.0"/>
<PackageVersion Include="Testcontainers" Version="3.10.0"/>
<PackageVersion Include="Testcontainers.MsSql" Version="3.10.0"/>
<PackageVersion Include="Testcontainers.SqlEdge" Version="3.10.0"/>
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ dotnet test ./SqlTest.Tests --framework net8.0 -e CollectCoverage=true -e Coverl
## Run project with .NET 8

```
dotnet run --project SqlTest --framework net8.0 -- runall --image mcr.microsoft.com/mssql/server --project Database.Tests/Ok
dotnet run --project SqlTest --framework net8.0 -- runall --image mcr.microsoft.com/azure-sql-edge --project Database.Tests/Ok
dotnet run --project SqlTest --framework net8.0 -- runall --image mcr.microsoft.com/mssql/server:2019-latest --project Database.Tests/Ok
dotnet run --project SqlTest --framework net8.0 -- runall --image mcr.microsoft.com/mssql/server:2022-latest --project Database.Tests/Ok
```

## Exclude Dacpacks from outdated dependencies
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


# dotnet-sqltest
Command line tool for running tSQLt unit tests from MSBuild.Sdk.SqlProj projects inside throwaway instances of Docker containers for all compatible SQL Server or Azure SQL Edge images.
Command line tool for running tSQLt unit tests from MSBuild.Sdk.SqlProj projects inside throwaway instances of Docker containers for all compatible SQL Server images.

## Usage
Install the tool from the package:
Expand Down
6 changes: 3 additions & 3 deletions SqlTest.Tests/DatabaseTests/BaseDatabaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ public class BaseDatabaseTests
{
public static IEnumerable<object[]> Images => new[]
{
new object[] { "mcr.microsoft.com/mssql/server" },
new object[] { "mcr.microsoft.com/azure-sql-edge" },
new object[] { "mcr.microsoft.com/mssql/server:2019-latest" },
new object[] { "mcr.microsoft.com/mssql/server:2022-latest" },
};

public string Folder { get; init; } = "../../../../Database.Tests";
Expand All @@ -18,6 +18,6 @@ public void InvokeDockerPullPassed(string image)
var results = SystemConsole.Invoke($"docker pull {image}; echo $LASTEXITCODE");

Assert.That.IsLike(results.Reverse().First().ToString(), "0");
Assert.That.IsLike(results.Reverse().Skip(1).First().ToString(), $"{image}:latest");
Assert.That.IsLike(results.Reverse().Skip(1).First().ToString(), $"{image}");
}
}
2 changes: 1 addition & 1 deletion SqlTest.Tests/DatabaseTests/OkDatabaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void InvokeSqlTestRunAllOkWithXmlCobertura(string image)
string pattern = """
<?xml version="1.0"?>
<!--DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-03.dtd"-->
<coverage lines-valid="5" lines-covered="3" line-rate="0.6" version="1.9" timestamp="__________.%">
<coverage lines-valid="5" lines-covered="3" line-rate="0[.,]6" version="1[.,]9" timestamp="__________[.,]%">
<packages>
<package name="Database.Tests">
<classes>
Expand Down
20 changes: 0 additions & 20 deletions SqlTest.Tests/TestcontainersTests/SqlEdgeTestcontainerTests.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ public void ShouldCreateMsSqlTestcontainer()
Assert.IsInstanceOfType(testcontainer, typeof(MsSqlTestcontainer));
}

[TestMethod]
public void ShouldCreateSqlEdgeTestcontainer()
{
var testcontainer = TestcontainerFactory.Create("mcr.microsoft.com/azure-sql-edge");

Assert.IsInstanceOfType(testcontainer, typeof(SqlEdgeTestcontainer));
}

[DataTestMethod]
[DataRow("SQL_Latin1_General_CP1_CI_AS", null)]
[DataRow("SQL_Latin1_General_CP1_CI_AS", "")]
Expand Down
38 changes: 0 additions & 38 deletions SqlTest/Testcontainers/SqlEdgeTestcontainer.cs

This file was deleted.

4 changes: 0 additions & 4 deletions SqlTest/Testcontainers/TestcontainerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ public static ITestcontainer Create(string image)
{
return new LocalhostTestcontainer();
}
else if (image.Contains("azure-sql-edge", StringComparison.InvariantCulture))
{
return new SqlEdgeTestcontainer();
}
else
{
return new MsSqlTestcontainer();
Expand Down

0 comments on commit f801b77

Please sign in to comment.