Skip to content

Commit

Permalink
Ignore other providers for specific test for a provider
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmartinezramirez committed Jul 12, 2024
1 parent a8be169 commit ae012ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace Snowflake.Data.Tests.UnitTests
using Azure.Storage.Blobs.Models;

[TestFixture]
[IgnoreOnEnvIs("snowflake_cloud_env",
new string[] { "GCP", "AWS" })]
class SFAzureClientTest : SFBaseTest
{
// Mock data for file metadata
Expand Down Expand Up @@ -63,7 +65,7 @@ class SFAzureClientTest : SFBaseTest
public void BeforeTest()

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net6.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net8.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net8.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net6.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net7.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net7.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net8.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net48, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net6.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net472, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net7.0, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net481, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net471, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 65 in Snowflake.Data.Tests/UnitTests/SFAzureClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net462, AZURE)

'SFAzureClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.
{
t_downloadFileName = TestNameWithWorker + "_mockFileName.txt";

_fileMetadata = new SFFileMetadata()
{
stageInfo = new PutGetStageInfo()
Expand Down
4 changes: 3 additions & 1 deletion Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ namespace Snowflake.Data.Tests.UnitTests
using Moq;

[TestFixture]
[IgnoreOnEnvIs("snowflake_cloud_env",
new string[] { "AWS", "AZURE" })]
class SFGCSClientTest : SFBaseTest
{
// Mock data for file metadata
Expand Down Expand Up @@ -56,7 +58,7 @@ class SFGCSClientTest : SFBaseTest
public void BeforeTest()

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net6.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net8.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net8.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net6.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net7.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net7.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net8.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net48, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net6.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net472, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net7.0, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net481, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net471, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 58 in Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net462, AZURE)

'SFGCSClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.
{
t_downloadFileName = TestNameWithWorker + "_mockFileName.txt";

_fileMetadata = new SFFileMetadata()
{
stageInfo = new PutGetStageInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public void BeforeTest()
};

// Set the mock GCS client to use
// TODO: ISSUE WITH SPLIT ALWAYS USING GCP SPECIFIC CLIENT IN TESTS
_client = new SFGCSClient(_fileMetadata.stageInfo);
_fileMetadata.client = _client;

Expand Down
8 changes: 5 additions & 3 deletions Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace Snowflake.Data.Tests.UnitTests
using Amazon.S3.Model;

[TestFixture]
[IgnoreOnEnvIs("snowflake_cloud_env",
new string[] { "GCP", "AZURE" })]
class SFS3ClientTest : SFBaseTest
{
// Mock data for file metadata
Expand Down Expand Up @@ -81,7 +83,7 @@ class SFS3ClientTest : SFBaseTest
public void BeforeTest()

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net6.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net8.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net8.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net6.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net7.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net7.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net8.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net48, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net6.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net472, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net7.0, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net481, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net471, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.

Check warning on line 83 in Snowflake.Data.Tests/UnitTests/SFS3ClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net462, AZURE)

'SFS3ClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.
{
t_downloadFileName = TestNameWithWorker + "_mockFileName.txt";

_fileMetadata = new SFFileMetadata()
{
stageInfo = new PutGetStageInfo()
Expand Down Expand Up @@ -274,7 +276,7 @@ public async Task TestUploadFileAsync(string requestKey, ResultStatus expectedRe
iv = MockS3Client.AmzIV,
key = MockS3Client.AmzKey,
matDesc = MockS3Client.AmzMatdesc
},
},
_cancellationToken).ConfigureAwait(false);

// Assert
Expand Down Expand Up @@ -331,7 +333,7 @@ public async Task TestDownloadFileAsync(string requestKey, ResultStatus expected
_client = new SFS3Client(_fileMetadata.stageInfo, MaxRetry, Parallel, _proxyCredentials, mockAmazonS3Client.Object);
_fileMetadata.client = _client;
_fileMetadata.stageInfo.location = requestKey;

// Act
await _client.DownloadFileAsync(_fileMetadata, t_downloadFileName, Parallel, _cancellationToken).ConfigureAwait(false);

Expand Down

0 comments on commit ae012ae

Please sign in to comment.