From 47b08d9160481c185597e395b43da84ba789e17f Mon Sep 17 00:00:00 2001 From: Piotr Bulawa Date: Wed, 13 Sep 2023 10:48:03 +0200 Subject: [PATCH 1/3] Log the test status --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c8489a8e..86da91f0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,7 @@ jobs: - name: Run Tests run: | cd Snowflake.Data.Tests - dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build" --output windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config + dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output windows_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config env: snowflake_cloud_env: ${{ matrix.cloud_env }} net_version: ${{ matrix.dotnet }} @@ -121,7 +121,7 @@ jobs: - name: Run Tests run: | cd Snowflake.Data.Tests - dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build" --output linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config + dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output linux_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config env: snowflake_cloud_env: ${{ matrix.cloud_env }} net_version: ${{ matrix.dotnet }} @@ -178,7 +178,7 @@ jobs: - name: Run Tests run: | cd Snowflake.Data.Tests - dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build" --output macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config + dotnet-coverage collect "dotnet test --framework ${{ matrix.dotnet }} --no-build -l console;verbosity=normal" --output macos_${{ matrix.dotnet }}_${{ matrix.cloud_env }}_coverage.xml --output-format cobertura --settings coverage.config env: snowflake_cloud_env: ${{ matrix.cloud_env }} net_version: ${{ matrix.dotnet }} From 6ff927ae58a24d07d5efc8434e9cbf40aa2be244 Mon Sep 17 00:00:00 2001 From: Piotr Bulawa Date: Wed, 13 Sep 2023 11:12:23 +0200 Subject: [PATCH 2/3] Remove test progress markers --- .../IntegrationTests/SFBindTestIT.cs | 7 ------ .../IntegrationTests/SFConnectionIT.cs | 7 ------ .../IntegrationTests/SFConnectionPoolT.cs | 7 ------ .../IntegrationTests/SFDbAdaptorIT.cs | 7 ------ .../IntegrationTests/SFDbCommandIT.cs | 23 ------------------- .../IntegrationTests/SFDbDataReaderIT.cs | 7 ------ .../IntegrationTests/SFDbFactoryIT.cs | 7 ------ .../IntegrationTests/SFDbTransactionIT.cs | 7 ------ .../IntegrationTests/SFMultiStatementsIT.cs | 7 ------ .../IntegrationTests/SFPutGetTest.cs | 7 ------ .../IntegrationTests/SFReusableChunkTest.cs | 7 ------ .../UnitTests/ArrowChunkParserTest.cs | 7 ------ .../UnitTests/ArrowResultChunkTest.cs | 8 ------- .../UnitTests/ArrowResultSetTest.cs | 7 ------ .../UnitTests/ChunkDeserializerTest.cs | 7 ------ .../UnitTests/ChunkDownloaderFactoryTest.cs | 7 ------ .../UnitTests/ChunkParserFactoryTest.cs | 7 ------ .../UnitTests/ChunkStreamingParserTest.cs | 7 ------ .../UnitTests/ConcatenatedStreamTest.cs | 7 ------ .../UnitTests/FastMemoryStreamTest.cs | 7 ------ .../UnitTests/FastParserTest.cs | 7 ------ .../UnitTests/SFAuthenticatorFactoryTest.cs | 7 ------ .../UnitTests/SFAzureClientTest.cs | 7 ------ .../UnitTests/SFDataConverterTest.cs | 7 ------ .../UnitTests/SFDbCommandBuilderTest.cs | 7 ------ .../UnitTests/SFDbParameterCollectionTest.cs | 7 ------ .../UnitTests/SFDbParameterTest.cs | 7 ------ .../UnitTests/SFGCSClientTest.cs | 7 ------ .../UnitTests/SFLoggerTest.cs | 7 ------ Snowflake.Data.Tests/UnitTests/SFOktaTest.cs | 6 ----- .../UnitTests/SFReusableChunkTest.cs | 7 ------ .../UnitTests/SFS3ClientTest.cs | 6 ----- .../UnitTests/SFStatementTest.cs | 7 ------ .../UnitTests/SFUriUpdaterTest.cs | 7 ------ .../UnitTests/SecretDetectorTest.cs | 7 ------ 35 files changed, 260 deletions(-) diff --git a/Snowflake.Data.Tests/IntegrationTests/SFBindTestIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFBindTestIT.cs index e5cc8b912..94bdc8bd8 100755 --- a/Snowflake.Data.Tests/IntegrationTests/SFBindTestIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFBindTestIT.cs @@ -18,13 +18,6 @@ namespace Snowflake.Data.Tests.IntegrationTests [TestFixture] class SFBindTestIT : SFBaseTest { - [Test] - [Ignore("BindTestIT")] - public void BindTestITDone() - { - // Do nothing; - } - [Test] public void testArrayBind() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs index ed1969900..40bc46acc 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs @@ -23,13 +23,6 @@ class SFConnectionIT : SFBaseTest { private static readonly SFLogger s_logger = SFLoggerFactory.GetLogger(); - [Test] - [Ignore("ConnectionIT")] - public void ConnectionITDone() - { - // Do nothing; - } - [Test] public void TestBasicConnection() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFConnectionPoolT.cs b/Snowflake.Data.Tests/IntegrationTests/SFConnectionPoolT.cs index 45148f066..005db6605 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFConnectionPoolT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFConnectionPoolT.cs @@ -62,13 +62,6 @@ public static void AfterAllTests() SnowflakeDbConnectionPool.ClearAllPools(); } - [Test] - [Ignore("dummy test case for showing test progress.")] - public void ConnectionPoolTDone() - { - // Do nothing; - } - [Test] // test connection pooling with concurrent connection public void TestConcurrentConnectionPooling() diff --git a/Snowflake.Data.Tests/IntegrationTests/SFDbAdaptorIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFDbAdaptorIT.cs index d04c37252..4f71b9b1e 100755 --- a/Snowflake.Data.Tests/IntegrationTests/SFDbAdaptorIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFDbAdaptorIT.cs @@ -22,13 +22,6 @@ public void BeforeTest() _command = new SnowflakeDbCommand(); } - [Test] - [Ignore("DbAdaptorIT")] - public void DbAdaptorITDone() - { - // Do nothing; - } - [Test] public void TestCreatingDataAdapterWithSelectCommand() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs index d11eef143..98e9af7c1 100755 --- a/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs @@ -20,14 +20,6 @@ namespace Snowflake.Data.Tests.IntegrationTests [TestFixture] class SFDbCommandITAsync : SFBaseTestAsync { - - [Test] - [Ignore("DbCommandITAsync")] - public void DbCommandITAsyncDone() - { - // Do nothing; - } - [Test] public void TestExecAsyncAPI() { @@ -103,14 +95,6 @@ public void TestCancelExecuteAsync() [TestFixture] class SFDbCommandITSlow : SFBaseTest { - - [Test] - [Ignore("DbCommandITSlow")] - public void DbCommandITSlowDone() - { - // Do nothing; - } - [Test] public void TestLongRunningQuery() { @@ -156,13 +140,6 @@ public void TestRowsAffectedOverflowInt() [TestFixture] class SFDbCommandIT : SFBaseTest { - [Test] - [Ignore("DbCommandIT")] - public void DbCommandITDone() - { - // Do nothing; - } - [Test] public void TestSimpleCommand() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFDbDataReaderIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFDbDataReaderIT.cs index 50de55fcc..158abc7f0 100755 --- a/Snowflake.Data.Tests/IntegrationTests/SFDbDataReaderIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFDbDataReaderIT.cs @@ -20,13 +20,6 @@ class SFDbDataReaderIT : SFBaseTest { static private readonly Random rand = new Random(); - [Test] - [Ignore("DbDataReaderIT")] - public void DbDataReaderITDone() - { - // Do nothing; - } - [Test] public void testRecordsAffected() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFDbFactoryIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFDbFactoryIT.cs index 95b497a68..580f16f7f 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFDbFactoryIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFDbFactoryIT.cs @@ -40,13 +40,6 @@ public void AfterTest() _connection.Close(); } - [Test] - [Ignore("DbFactoryIT")] - public void DbFactoryITDone() - { - // Do nothing; - } - [Test] public void TestSimpleDbFactory() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFDbTransactionIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFDbTransactionIT.cs index a92637518..c0b571f98 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFDbTransactionIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFDbTransactionIT.cs @@ -15,13 +15,6 @@ namespace Snowflake.Data.Tests.IntegrationTests [TestFixture] class SFDbTransactionIT : SFBaseTest { - [Test] - [Ignore("DbTransactionIT")] - public void DbTransactionITDone() - { - // Do nothing; - } - [Test] // Test that when a transaction is disposed, rollback would be sent out public void TestTransactionDispose() diff --git a/Snowflake.Data.Tests/IntegrationTests/SFMultiStatementsIT.cs b/Snowflake.Data.Tests/IntegrationTests/SFMultiStatementsIT.cs index b05389fba..8247d7048 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFMultiStatementsIT.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFMultiStatementsIT.cs @@ -18,13 +18,6 @@ namespace Snowflake.Data.Tests.IntegrationTests [TestFixture] class SFMultiStatementsIT : SFBaseTest { - [Test] - [Ignore("MultiStatementsIT")] - public void MultiStatementsITDone() - { - // Do nothing; - } - [Test] public void testSelectWithoutBinding() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFPutGetTest.cs b/Snowflake.Data.Tests/IntegrationTests/SFPutGetTest.cs index c3f8a3dcd..02b6fbe53 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFPutGetTest.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFPutGetTest.cs @@ -47,13 +47,6 @@ public enum StageType NAMED } - [Test] - [Ignore("PutGetTest")] - public void PutGetTestDone() - { - // Do nothing; - } - [OneTimeSetUp] public static void OneTimeSetUp() { diff --git a/Snowflake.Data.Tests/IntegrationTests/SFReusableChunkTest.cs b/Snowflake.Data.Tests/IntegrationTests/SFReusableChunkTest.cs index 07ed0046d..54c0fe49e 100644 --- a/Snowflake.Data.Tests/IntegrationTests/SFReusableChunkTest.cs +++ b/Snowflake.Data.Tests/IntegrationTests/SFReusableChunkTest.cs @@ -12,13 +12,6 @@ namespace Snowflake.Data.Tests.IntegrationTests [TestFixture, NonParallelizable] class SFReusableChunkTest : SFBaseTest { - [Test] - [Ignore("ReusableChunkTest")] - public void ReusableChunkTestDone() - { - // Do nothing; - } - [Test] public void testDelCharPr431() { diff --git a/Snowflake.Data.Tests/UnitTests/ArrowChunkParserTest.cs b/Snowflake.Data.Tests/UnitTests/ArrowChunkParserTest.cs index ce9cbfb81..c6da4a27d 100644 --- a/Snowflake.Data.Tests/UnitTests/ArrowChunkParserTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ArrowChunkParserTest.cs @@ -20,13 +20,6 @@ namespace Snowflake.Data.Tests.UnitTests [TestFixture, NonParallelizable] class ArrowChunkParserTest { - [Test] - [Ignore("ArrowChunkParserTest")] - public void ArrowChunkParserTestDone() - { - // Do nothing - test progress marker - } - [Test] public void TestParseChunkReadsRecordBatches([Values(1, 2, 4)] int numberOfRecordBatch) { diff --git a/Snowflake.Data.Tests/UnitTests/ArrowResultChunkTest.cs b/Snowflake.Data.Tests/UnitTests/ArrowResultChunkTest.cs index 642afb275..673e95c84 100755 --- a/Snowflake.Data.Tests/UnitTests/ArrowResultChunkTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ArrowResultChunkTest.cs @@ -25,14 +25,6 @@ class ArrowResultChunkTest .Build(); private ArrowResultChunk _chunk; - - [Test] - [Ignore("ArrowResultChunkTest")] - public void SFArrowResultChunkTestDone() - { - // Do nothing - test progress marker - } - [Test] public void TestAddRecordBatchAddsBatchTwo() { diff --git a/Snowflake.Data.Tests/UnitTests/ArrowResultSetTest.cs b/Snowflake.Data.Tests/UnitTests/ArrowResultSetTest.cs index aca014d4d..b2551d5e1 100755 --- a/Snowflake.Data.Tests/UnitTests/ArrowResultSetTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ArrowResultSetTest.cs @@ -22,13 +22,6 @@ class ArrowResultSetTest private RecordBatch _recordBatch; private ArrowResultSet _arrowResultSet; - [Test] - [Ignore("ArrowResultSetTest")] - public void SFResultSetArrowTestDone() - { - // Do nothing - test progress marker - } - [SetUp] public void BeforeTest() { diff --git a/Snowflake.Data.Tests/UnitTests/ChunkDeserializerTest.cs b/Snowflake.Data.Tests/UnitTests/ChunkDeserializerTest.cs index 63cc51f41..ac0b3ed26 100644 --- a/Snowflake.Data.Tests/UnitTests/ChunkDeserializerTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ChunkDeserializerTest.cs @@ -30,13 +30,6 @@ public void AfterTest() SFConfiguration.Instance().ChunkParserVersion = ChunkParserVersionDefault; // Return to default version } - [Test] - [Ignore("ChunkDeserializerTest")] - public void ChunkDeserializerTestDone() - { - // Do nothing; - } - public IChunkParser getParser(string data) { byte[] bytes = Encoding.UTF8.GetBytes(data); diff --git a/Snowflake.Data.Tests/UnitTests/ChunkDownloaderFactoryTest.cs b/Snowflake.Data.Tests/UnitTests/ChunkDownloaderFactoryTest.cs index a9d994564..e2998197a 100644 --- a/Snowflake.Data.Tests/UnitTests/ChunkDownloaderFactoryTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ChunkDownloaderFactoryTest.cs @@ -24,13 +24,6 @@ public void AfterTest() SFConfiguration.Instance().ChunkDownloaderVersion = ChunkDownloaderVersionDefault; // Return to default version } - [Test] - [Ignore("ChunkDownloaderFactoryTest")] - public void ChunkDownloaderFactoryTestDone() - { - // Do nothing; - } - private QueryExecResponseData mockQueryRequestData() { return new QueryExecResponseData diff --git a/Snowflake.Data.Tests/UnitTests/ChunkParserFactoryTest.cs b/Snowflake.Data.Tests/UnitTests/ChunkParserFactoryTest.cs index da1c1ae0e..0ab79bcfc 100644 --- a/Snowflake.Data.Tests/UnitTests/ChunkParserFactoryTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ChunkParserFactoryTest.cs @@ -27,13 +27,6 @@ public void AfterTest() SFConfiguration.Instance().ChunkParserVersion = ChunkParserVersionDefault; // Return to default version } - [Test] - [Ignore("ChunkParserFactoryTest")] - public void ChunkParserFactoryTestDone() - { - // Do nothing; - } - [Test] public void TestGetParser([Values(false, true)] bool useV2JsonParser, [Values(1, 2, 3, 4)] int chunkParserVersion) { diff --git a/Snowflake.Data.Tests/UnitTests/ChunkStreamingParserTest.cs b/Snowflake.Data.Tests/UnitTests/ChunkStreamingParserTest.cs index e1194aaa1..06e94ed08 100644 --- a/Snowflake.Data.Tests/UnitTests/ChunkStreamingParserTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ChunkStreamingParserTest.cs @@ -30,13 +30,6 @@ public void AfterTest() SFConfiguration.Instance().ChunkParserVersion = ChunkParserVersionDefault; // Return to default version } - [Test] - [Ignore("ChunkStreamingParserTest")] - public void ChunkStreamingParserTestDone() - { - // Do nothing; - } - public IChunkParser getParser(string data) { byte[] bytes = Encoding.UTF8.GetBytes(data); diff --git a/Snowflake.Data.Tests/UnitTests/ConcatenatedStreamTest.cs b/Snowflake.Data.Tests/UnitTests/ConcatenatedStreamTest.cs index 71b3d4bb2..db06693c7 100644 --- a/Snowflake.Data.Tests/UnitTests/ConcatenatedStreamTest.cs +++ b/Snowflake.Data.Tests/UnitTests/ConcatenatedStreamTest.cs @@ -28,13 +28,6 @@ public void BeforeTest() _concatStream = new ConcatenatedStream(new Stream[3] { openBracket, stream, closeBracket }); } - [Test] - [Ignore("ConcatenatedStreamTest")] - public void ConcatenatedStreamTestDone() - { - // Do nothing; - } - [Test] public void TestCanRead() { diff --git a/Snowflake.Data.Tests/UnitTests/FastMemoryStreamTest.cs b/Snowflake.Data.Tests/UnitTests/FastMemoryStreamTest.cs index 351dd3710..e755a4604 100644 --- a/Snowflake.Data.Tests/UnitTests/FastMemoryStreamTest.cs +++ b/Snowflake.Data.Tests/UnitTests/FastMemoryStreamTest.cs @@ -19,13 +19,6 @@ public void BeforeTest() _fastMemoryStream = new FastMemoryStream(); } - [Test] - [Ignore("FastMemoryStreamTest")] - public void FastMemoryStreamTestDone() - { - // Do nothing; - } - [Test] public void TestDefaultValues() { diff --git a/Snowflake.Data.Tests/UnitTests/FastParserTest.cs b/Snowflake.Data.Tests/UnitTests/FastParserTest.cs index 41060cbd8..cf7d88aab 100644 --- a/Snowflake.Data.Tests/UnitTests/FastParserTest.cs +++ b/Snowflake.Data.Tests/UnitTests/FastParserTest.cs @@ -22,13 +22,6 @@ public void AfterTest() _byte = null; } - [Test] - [Ignore("FastParserTest")] - public void FastParserTestDone() - { - // Do nothing; - } - [Test] public void TestFastParseInt64WithLongMaxValue() { diff --git a/Snowflake.Data.Tests/UnitTests/SFAuthenticatorFactoryTest.cs b/Snowflake.Data.Tests/UnitTests/SFAuthenticatorFactoryTest.cs index d305423bf..3157619ae 100644 --- a/Snowflake.Data.Tests/UnitTests/SFAuthenticatorFactoryTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFAuthenticatorFactoryTest.cs @@ -14,13 +14,6 @@ class SFAuthenticatorFactoryTest { IAuthenticator _authenticator; - [Test] - [Ignore("SFAuthenticatorFactory")] - public void SFAuthenticatorFactoryDone() - { - // Do nothing; - } - private IAuthenticator GetAuthenticator(string authenticatorName, string extraParams = "") { string connectionString = $"account=test;user=test;password=test;authenticator={authenticatorName};{extraParams}"; diff --git a/Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs b/Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs index 71db1466a..79ef7ed6d 100644 --- a/Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs @@ -83,13 +83,6 @@ public void BeforeTest() _cancellationToken = new CancellationToken(); } - [Test] - [Ignore("AzureClientTest")] - public void AzureClientTestDone() - { - // Do nothing; - } - [Test] public void TestExtractBucketNameAndPath() { diff --git a/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs b/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs index b00034ac9..65160ac97 100755 --- a/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFDataConverterTest.cs @@ -16,13 +16,6 @@ namespace Snowflake.Data.Tests.UnitTests [SetCulture("en-US")] class SFDataConverterTest { - [Test] - [Ignore("DataConverterTest")] - public void DataConverterTestDone() - { - // Do nothing; - } - // Method with the same signature as before the performance work // Used by unit tests only private UTF8Buffer ConvertToUTF8Buffer(string srcVal) diff --git a/Snowflake.Data.Tests/UnitTests/SFDbCommandBuilderTest.cs b/Snowflake.Data.Tests/UnitTests/SFDbCommandBuilderTest.cs index 41615e699..69f67d06f 100644 --- a/Snowflake.Data.Tests/UnitTests/SFDbCommandBuilderTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFDbCommandBuilderTest.cs @@ -18,13 +18,6 @@ public void BeforeTest() builder = new SnowflakeDbCommandBuilder(); } - [Test] - [Ignore("DbCommandBuilder")] - public void DbCommandBuilderDone() - { - // Do nothing; - } - [Test] public void TestDefaultCommandBuilder() { diff --git a/Snowflake.Data.Tests/UnitTests/SFDbParameterCollectionTest.cs b/Snowflake.Data.Tests/UnitTests/SFDbParameterCollectionTest.cs index 77ad0b606..c3f798f97 100644 --- a/Snowflake.Data.Tests/UnitTests/SFDbParameterCollectionTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFDbParameterCollectionTest.cs @@ -22,13 +22,6 @@ public void BeforeTest() _parameterCollection = new SnowflakeDbParameterCollection(); } - [Test] - [Ignore("DbParameterCollection")] - public void DbParameterCollectionDone() - { - // Do nothing; - } - [Test] public void TestDefaultDbParameterCollection() { diff --git a/Snowflake.Data.Tests/UnitTests/SFDbParameterTest.cs b/Snowflake.Data.Tests/UnitTests/SFDbParameterTest.cs index 3cf84c1a9..7674d096a 100644 --- a/Snowflake.Data.Tests/UnitTests/SFDbParameterTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFDbParameterTest.cs @@ -14,13 +14,6 @@ class SFDbParameterTest { SnowflakeDbParameter _parameter; - [Test] - [Ignore("DbParameter")] - public void DbParameterDone() - { - // Do nothing; - } - [Test] public void TestDefaultDbParameter() { diff --git a/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs b/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs index f2c812fad..f894a82e6 100644 --- a/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs @@ -79,13 +79,6 @@ public void BeforeTest() _cancellationToken = new CancellationToken(); } - [Test] - [Ignore("GCSClientTest")] - public void GCSClientTestDone() - { - // Do nothing; - } - [Test] public void TestExtractBucketNameAndPath() { diff --git a/Snowflake.Data.Tests/UnitTests/SFLoggerTest.cs b/Snowflake.Data.Tests/UnitTests/SFLoggerTest.cs index 5edfae7dd..18e5dd876 100644 --- a/Snowflake.Data.Tests/UnitTests/SFLoggerTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFLoggerTest.cs @@ -32,13 +32,6 @@ [TearDown] public void AfterTest() SFLoggerFactory.enableLogger(); } - [Test] - [Ignore("SFLoggerTest")] - public void SFLoggerTestDone() - { - // Do nothing; - } - [Test] public void TestUsingDefaultLogger() { diff --git a/Snowflake.Data.Tests/UnitTests/SFOktaTest.cs b/Snowflake.Data.Tests/UnitTests/SFOktaTest.cs index 0c667553b..81b958c81 100644 --- a/Snowflake.Data.Tests/UnitTests/SFOktaTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFOktaTest.cs @@ -10,12 +10,6 @@ class SFOktaTest { StringContent wrongPostbackContent = new StringContent(" < !DOCTYPE html >< html lang =\"en\">\n\n\n\n\n\n\n\n\n\n\n\nSnowflake - Signing in...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n \n\n
\n
\n
\n
\n \"Please\"Please\"Okta\"
\n
\n

Signing in to TESTACCOUNT (regression)

\n
\n
\n
\n\n \n
\n \n \n
\n\n
\n\n\n\n"); StringContent noPostbackContent = new StringContent(" < !DOCTYPE html >< html lang =\"en\">\n\n\n\n\n\n\n\n\n\n\n\nSnowflake - Signing in...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n \n\n
\n
\n
\n
\n \"Please\"Please\"Okta\"
\n
\n

Signing in to TESTACCOUNT (regression)

\n
\n
\n
\n\n \n
\n \n \n
\n\n
\n\n\n\n"); - [Test] - [Ignore("OktaTest")] - public void OktaTestDone() - { - // Do nothing; - } [Test] public void TestSsoTokenUrlMismatch() diff --git a/Snowflake.Data.Tests/UnitTests/SFReusableChunkTest.cs b/Snowflake.Data.Tests/UnitTests/SFReusableChunkTest.cs index 64ac8d1a2..4ca4eec79 100755 --- a/Snowflake.Data.Tests/UnitTests/SFReusableChunkTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFReusableChunkTest.cs @@ -17,13 +17,6 @@ namespace Snowflake.Data.Tests.UnitTests [TestFixture] class SFReusableChunkTest { - [Test] - [Ignore("ReusableChunkTest")] - public void ReusableChunkTestDone() - { - // Do nothing; - } - [Test] public void TestExtractCellWithRowParameterReadsAllRows() { diff --git a/Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs b/Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs index 0a3671299..561819623 100644 --- a/Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs @@ -102,12 +102,6 @@ public void BeforeTest() _cancellationToken = new CancellationToken(); } - [Test] - [Ignore("S3ClientTest")] - public void S3ClientTestDone() - { - // Do nothing; - } [Test] public void TestExtractBucketNameAndPath() diff --git a/Snowflake.Data.Tests/UnitTests/SFStatementTest.cs b/Snowflake.Data.Tests/UnitTests/SFStatementTest.cs index 3fe8c3487..330b19f96 100755 --- a/Snowflake.Data.Tests/UnitTests/SFStatementTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFStatementTest.cs @@ -13,13 +13,6 @@ namespace Snowflake.Data.Tests.UnitTests [TestFixture] class SFStatementTest { - [Test] - [Ignore("StatementTest")] - public void StatementTestDone() - { - // Do nothing; - } - // Mock test for session token renew [Test] public void TestSessionRenew() diff --git a/Snowflake.Data.Tests/UnitTests/SFUriUpdaterTest.cs b/Snowflake.Data.Tests/UnitTests/SFUriUpdaterTest.cs index d754730dd..cd2dd23a4 100644 --- a/Snowflake.Data.Tests/UnitTests/SFUriUpdaterTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFUriUpdaterTest.cs @@ -11,13 +11,6 @@ namespace Snowflake.Data.Tests.UnitTests [TestFixture] class SFUriUpdaterTest { - [Test] - [Ignore("UriUpdaterTest")] - public void UriUpdaterTestDone() - { - // Do nothing; - } - [Test] public void TestRetryCount() { diff --git a/Snowflake.Data.Tests/UnitTests/SecretDetectorTest.cs b/Snowflake.Data.Tests/UnitTests/SecretDetectorTest.cs index cf2408d18..862a7c248 100644 --- a/Snowflake.Data.Tests/UnitTests/SecretDetectorTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SecretDetectorTest.cs @@ -31,13 +31,6 @@ public void BasicMasking(string text) Assert.IsNull(mask.errStr); } - [Test] - [Ignore("SecretDetectorTest")] - public void SecretDetectorTestDone() - { - // Do nothing; - } - [Test] public void TestNullString() { From 49213b5c47addd2e45ca02282b2e3da229074044 Mon Sep 17 00:00:00 2001 From: Piotr Bulawa Date: Thu, 14 Sep 2023 10:06:15 +0200 Subject: [PATCH 3/3] Change readme to use dotnet-cover and output the test status --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 90c0347a7..97f276b5c 100644 --- a/README.md +++ b/README.md @@ -88,14 +88,14 @@ The build solution file builds the connector and tests binaries. Issue the follo ```{r, engine='bash', code_block_name} cd Snowflake.Data.Tests -dotnet test -f netcoreapp6.0 +dotnet test -f net6.0 -l "console;verbosity=normal" ``` Tests can also be run under code coverage: ```{r, engine='bash', code_block_name} -OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -returntargetcode -targetargs:"test -f netcoreapp6.0" -register:user -filter:"+[Snowflake.Data]*" -output:"netcoreapp6.0_coverage.xml" -oldStyle +dotnet-coverage collect "dotnet test --framework net6.0 --no-build -l console;verbosity=normal" --output net6.0_coverage.xml --output-format cobertura --settings coverage.config ``` You can run only specific suite of tests (integration or unit). @@ -104,14 +104,14 @@ Running unit tests: ```bash cd Snowflake.Data.Tests -dotnet test --filter FullyQualifiedName~UnitTests +dotnet test -l "console;verbosity=normal" --filter FullyQualifiedName~UnitTests -l console;verbosity=normal ``` Running integration tests: ```bash cd Snowflake.Data.Tests -dotnet test --filter FullyQualifiedName~IntegrationTests +dotnet test -l "console;verbosity=normal" --filter FullyQualifiedName~IntegrationTests ``` Visual Studio 2017 @@ -707,9 +707,9 @@ dotnet clean snowflake-connector-net.sln && dotnet nuget locals all --clear dotnet build snowflake-connector-net.sln /p:DebugType=Full ``` -5. Run OpenCover on the .NET6 build +5. Run dotnet-cover on the .NET6 build ``` -OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -returntargetcode -targetargs:"test -f net6.0 -v n" -register:user -filter:"+[Snowflake.Data]*" -output:"net6.0_AWS_coverage.xml" -oldStyle +dotnet-coverage collect "dotnet test --framework net6.0 --no-build -l console;verbosity=normal" --output net6.0_AWS_coverage.xml --output-format cobertura --settings coverage.config ``` 6. Build the project for .NET Framework @@ -717,9 +717,9 @@ OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -returntarget msbuild snowflake-connector-net.sln -p:Configuration=Release ``` -7. Run OpenCover on the .NET Framework build +7. Run dotnet-cover on the .NET Framework build ``` -OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -returntargetcode -targetargs:"test -f net472 -v n" -register:user -filter:"+[Snowflake.Data]*" -output:"net472_AWS_coverage.xml" -oldStyle +dotnet-coverage collect "dotnet test --framework net472 --no-build -l console;verbosity=normal" --output net472_AWS_coverage.xml --output-format cobertura --settings coverage.config ```
@@ -730,14 +730,14 @@ For Azure:
3. Create parameters.json containing connection info for AZURE account and place inside the Snowflake.Data.Tests folder -5. Run OpenCover on the .NET6 build +5. Run dotnet-cover on the .NET6 build ``` -OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -returntargetcode -targetargs:"test -f net6.0 -v n" -register:user -filter:"+[Snowflake.Data]*" -output:"net6.0_AZURE_coverage.xml" -oldStyle +dotnet-coverage collect "dotnet test --framework net6.0 --no-build -l console;verbosity=normal" --output net6.0_AZURE_coverage.xml --output-format cobertura --settings coverage.config ``` -7. Run OpenCover on the .NET Framework build +7. Run dotnet-cover on the .NET Framework build ``` -OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -returntargetcode -targetargs:"test -f net472 -v n" -register:user -filter:"+[Snowflake.Data]*" -output:"net472_AZURE_coverage.xml" -oldStyle +dotnet-coverage collect "dotnet test --framework net472 --no-build -l console;verbosity=normal" --output net472_AZURE_coverage.xml --output-format cobertura --settings coverage.config ```
@@ -745,14 +745,14 @@ For GCP:
3. Create parameters.json containing connection info for GCP account and place inside the Snowflake.Data.Tests folder -5. Run OpenCover on the .NET6 build +5. Run dotnet-cover on the .NET6 build ``` -OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -returntargetcode -targetargs:"test -f net6.0 -v n" -register:user -filter:"+[Snowflake.Data]*" -output:"net6.0_GCP_coverage.xml" -oldStyle +dotnet-coverage collect "dotnet test --framework net6.0 --no-build -l console;verbosity=normal" --output net6.0_GCP_coverage.xml --output-format cobertura --settings coverage.config ``` -7. Run OpenCover on the .NET Framework build +7. Run dotnet-cover on the .NET Framework build ``` -OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -returntargetcode -targetargs:"test -f net472 -v n" -register:user -filter:"+[Snowflake.Data]*" -output:"net472_GCP_coverage.xml" -oldStyle +dotnet-coverage collect "dotnet test --framework net472 --no-build -l console;verbosity=normal" --output net472_GCP_coverage.xml --output-format cobertura --settings coverage.config ``` Notice