Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snow 1296059 test AZURE split dependencies projects #993

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fail-fast: false
matrix:
dotnet: ['net6.0', 'net7.0', 'net8.0', 'net462', 'net471', 'net472', 'net48', 'net481']
cloud_env: ['AZURE', 'GCP', 'AWS']
cloud_env: ['AZURE']
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
fail-fast: false
matrix:
dotnet: ['net6.0', 'net7.0', 'net8.0']
cloud_env: ['AZURE', 'GCP', 'AWS']
cloud_env: ['AZURE']
steps:
- uses: actions/checkout@v3
- name: Setup Dotnet
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
fail-fast: false
matrix:
dotnet: ['net6.0', 'net7.0', 'net8.0']
cloud_env: ['AZURE', 'GCP', 'AWS']
cloud_env: ['AZURE']
steps:
- uses: actions/checkout@v4
- name: Setup Dotnet
Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,36 @@ Alternatively, packages can also be downloaded using Package Manager Console:
PM> Install-Package Snowflake.Data
```

# Cloud provider distributions

The Snowflake.Data package includes the full dependencies related to all the supported cloud providers, if you are only interested installing the package and the related dependencies for a specific cloud provider you have to execute the following commands

*Install our library core package*

```{r, engine='bash', code_block_name}
PM> Install-Package Snowflake.Data.Core
```

*After that install the specific package for the provider dependencies.*

```{r, engine='bash', code_block_name}
PM> Install-Package Snowflake.Data.{CLOUD_PROVIDER}
```

*e.g. AWS provider package*

```{r, engine='bash', code_block_name}
PM> Install-Package Snowflake.Data.AWS
```

__Packages by cloud provider__

| Cloud Provider | Package ID |
| -------------- | ---------------------- |
| AWS | Snowflake.Data.AWS |
| Azure | Snowflake.Data.Azure |
| Google Cloud | Snowflake.Data.GCP |

# Testing and Code Coverage

[Running tests](doc/Testing.md)
Expand Down
25 changes: 25 additions & 0 deletions Snowflake.Data.AWS/Snowflake.Data.AWS.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Title>Snowflake.Data.AWS</Title>
<PackageId>Snowflake.Data.AWS</PackageId>
<Description>Snowflake Connector AWS dependencies for .NET</Description>
<PackageLicenseUrl>https://github.com/snowflakedb/snowflake-connector-net/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/snowflakedb/snowflake-connector-net</PackageProjectUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageIconUrl>https://raw.githubusercontent.com/snowflakedb/snowflake-connector-net/master/Snowflake.Data/snowflake.ico</PackageIconUrl>
<Company>Snowflake Computing, Inc</Company>
<Product>Snowflake Connector for .NET</Product>
<Authors>Snowflake</Authors>
<Version>4.0.1-alpha01</Version>
<DebugType>Full</DebugType>
<LangVersion>7.3</LangVersion>
<RootNamespace>Snowflake.Data.AWS</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="3.7.0.4" />
</ItemGroup>

</Project>
26 changes: 26 additions & 0 deletions Snowflake.Data.Azure/Snowflake.Data.Azure.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Title>Snowflake.Data.Azure</Title>
<PackageId>Snowflake.Data.Azure</PackageId>
<Description>Snowflake Connector Azure dependencies for .NET</Description>
<PackageLicenseUrl>https://github.com/snowflakedb/snowflake-connector-net/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/snowflakedb/snowflake-connector-net</PackageProjectUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageIconUrl>https://raw.githubusercontent.com/snowflakedb/snowflake-connector-net/master/Snowflake.Data/snowflake.ico</PackageIconUrl>
<Company>Snowflake Computing, Inc</Company>
<Product>Snowflake Connector for .NET</Product>
<Authors>Snowflake</Authors>
<Version>4.0.1-alpha01</Version>
<DebugType>Full</DebugType>
<LangVersion>7.3</LangVersion>
<RootNamespace>Snowflake.Data.Azure</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" />
<PackageReference Include="Azure.Storage.Common" Version="12.12.0" />
</ItemGroup>

</Project>
File renamed without changes.
71 changes: 71 additions & 0 deletions Snowflake.Data.Core/Snowflake.Data.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Title>Snowflake.Data.Core</Title>
<PackageId>Snowflake.Data.Core</PackageId>
<Description>Snowflake Connector Core Library for .NET</Description>
<PackageLicenseUrl>https://github.com/snowflakedb/snowflake-connector-net/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/snowflakedb/snowflake-connector-net</PackageProjectUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageIconUrl>https://raw.githubusercontent.com/snowflakedb/snowflake-connector-net/master/Snowflake.Data/snowflake.ico</PackageIconUrl>
<Company>Snowflake Computing, Inc</Company>
<Product>Snowflake Connector for .NET</Product>
<Authors>Snowflake</Authors>
<Version>4.0.1-alpha01</Version>
<DebugType>Full</DebugType>
<LangVersion>7.3</LangVersion>
<RootNamespace>Snowflake.Data</RootNamespace>
</PropertyGroup>

<ItemGroup>

<PackageReference Include="AWSSDK.S3" Version="3.7.0.4" >
<ExcludeAssets>Runtime,Build,Native,Analyzers,BuildTransitive</ExcludeAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.10.0">
<ExcludeAssets>Runtime,Build,Native,Analyzers,BuildTransitive</ExcludeAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" >
<ExcludeAssets>Runtime,Build,Native,Analyzers,BuildTransitive</ExcludeAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>
<PackageReference Include="Azure.Storage.Common" Version="12.12.0" >
<ExcludeAssets>Runtime,Build,Native,Analyzers,BuildTransitive</ExcludeAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>
<PackageReference Include="Apache.Arrow" Version="14.0.2" />
<PackageReference Include="Mono.Unix" Version="7.1.0-final.1.21458.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.34.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Release'">
<InternalsVisibleTo Include="Snowflake.Data.Tests" />
<!--needed by Moq to be able to mock internal interfaces-->
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
</PropertyGroup>

<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>
File renamed without changes.
25 changes: 25 additions & 0 deletions Snowflake.Data.GCP/Snowflake.Data.GCP.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Title>Snowflake.Data.GCP</Title>
<PackageId>Snowflake.Data.GCP</PackageId>
<Description>Snowflake Connector GCP dependencies for .NET</Description>
<PackageLicenseUrl>https://github.com/snowflakedb/snowflake-connector-net/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/snowflakedb/snowflake-connector-net</PackageProjectUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageIconUrl>https://raw.githubusercontent.com/snowflakedb/snowflake-connector-net/master/Snowflake.Data/snowflake.ico</PackageIconUrl>
<Company>Snowflake Computing, Inc</Company>
<Product>Snowflake Connector for .NET</Product>
<Authors>Snowflake</Authors>
<Version>4.0.1-alpha01</Version>
<DebugType>Full</DebugType>
<LangVersion>7.3</LangVersion>
<RootNamespace>Snowflake.Data.GCP</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.10.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions Snowflake.Data.Tests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ Copyright (c) 2012-2017 Snowflake Computing Inc. All rights reserved.
<system.data>
<DbProviderFactories>
<add name="Snowflake" invariant="Snowflake.Data"
type="Snowflake.Data.Client.SnowflakeDbFactory, Snowflake.Data, Culture=neutral, PublicKeyToken=null"
type="Snowflake.Data.Client.SnowflakeDbFactory, Snowflake.Data.Core, Culture=neutral, PublicKeyToken=null"
description="Snowflake Provider" />
</DbProviderFactories>
</system.data>

<!--
<!--
=========== Enable Network debug log ===============
<system.diagnostics>
<sources>
Expand Down
3 changes: 2 additions & 1 deletion Snowflake.Data.Tests/Snowflake.Data.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<ProjectReference Include="..\Snowflake.Data\Snowflake.Data.csproj" />
<ProjectReference Include="..\Snowflake.Data.Azure\Snowflake.Data.Azure.csproj" />
<ProjectReference Include="..\Snowflake.Data.Core\Snowflake.Data.Core.csproj" />
</ItemGroup>
<Target Name="CopyCustomContent" AfterTargets="AfterBuild">
<Copy SourceFiles="parameters.json" DestinationFolder="$(OutDir)" />
Expand Down
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 @@
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 @@ -60,10 +62,10 @@
SFFileMetadata _fileMetadata;

[SetUp]
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 (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 (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 (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 (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 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 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 (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 (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 (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 (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 (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 (net462, 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.
{
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 @@
using Moq;

[TestFixture]
[IgnoreOnEnvIs("snowflake_cloud_env",
new string[] { "AWS", "AZURE" })]
class SFGCSClientTest : SFBaseTest
{
// Mock data for file metadata
Expand Down Expand Up @@ -53,10 +55,10 @@
SFFileMetadata _fileMetadata;

[SetUp]
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 (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 (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 (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 (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 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 (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 (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 (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 (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 (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 (net462, 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.
{
t_downloadFileName = TestNameWithWorker + "_mockFileName.txt";

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

[TestFixture]
[IgnoreOnEnvIs("snowflake_cloud_env",
new string[] { "AZURE", "AWS" })]
class SFRemoteStorageClientTest : SFBaseTest
{
// Mock data for file metadata
Expand Down Expand Up @@ -71,7 +73,7 @@
const bool IsAsync = true;

[SetUp]
public void BeforeTest()

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net471, AZURE)

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net48, AZURE)

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net481, AZURE)

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net462, AZURE)

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

Check warning on line 76 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net472, AZURE)

'SFRemoteStorageClientTest.BeforeTest()' hides inherited member 'SFBaseTestAsync.BeforeTest()'. Use the new keyword if hiding was intended.
{
t_realSourceFilePath = TestNameWithWorker + "_realSrcFilePath.txt";
t_downloadFileName = TestNameWithWorker + "_mockFileName.txt";
Expand Down Expand Up @@ -115,6 +117,7 @@
};

// 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 All @@ -122,7 +125,7 @@
}

[TearDown]
public void AfterTest()

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net471, AZURE)

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

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

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net48, AZURE)

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net481, AZURE)

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net462, AZURE)

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

Check warning on line 128 in Snowflake.Data.Tests/UnitTests/SFRemoteStorageClientTest.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net472, AZURE)

'SFRemoteStorageClientTest.AfterTest()' hides inherited member 'SFBaseTestAsync.AfterTest()'. Use the new keyword if hiding was intended.
{
// Delete temporary files from upload
if (File.Exists(_fileMetadata.realSrcFilePath))
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 @@
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 @@ -78,10 +80,10 @@
AmazonS3Config _clientConfig;

[SetUp]
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 (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 (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 (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 (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 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 (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 (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 (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 (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 (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 (net462, 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.
{
t_downloadFileName = TestNameWithWorker + "_mockFileName.txt";

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

// Assert
Expand Down Expand Up @@ -331,7 +333,7 @@
_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
24 changes: 5 additions & 19 deletions Snowflake.Data/Snowflake.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,16 @@
<Company>Snowflake Computing, Inc</Company>
<Product>Snowflake Connector for .NET</Product>
<Authors>Snowflake</Authors>
<Version>4.0.0</Version>
<Version>4.0.1-alpha01</Version>
<DebugType>Full</DebugType>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Apache.Arrow" Version="14.0.2" />
<PackageReference Include="AWSSDK.S3" Version="3.7.0.4" />
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.10.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" />
<PackageReference Include="Azure.Storage.Common" Version="12.12.0" />
<PackageReference Include="Mono.Unix" Version="7.1.0-final.1.21458.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.34.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Release'">
<InternalsVisibleTo Include="Snowflake.Data.Tests" />
<!--needed by Moq to be able to mock internal interfaces-->
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
<ProjectReference Include="..\Snowflake.Data.AWS\Snowflake.Data.AWS.csproj" />
<ProjectReference Include="..\Snowflake.Data.Azure\Snowflake.Data.Azure.csproj" />
<ProjectReference Include="..\Snowflake.Data.Core\Snowflake.Data.Core.csproj" />
<ProjectReference Include="..\Snowflake.Data.GCP\Snowflake.Data.GCP.csproj" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -49,7 +36,6 @@
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<AssemblyVersion>$(Version)</AssemblyVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
21 changes: 19 additions & 2 deletions deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,25 @@ echo -----END CERTIFICATE----- >> %WORKSPACE%\coded.txt
certutil -decode %WORKSPACE%\coded.txt %WORKSPACE%\key.snk

dotnet build Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=%WORKSPACE%\key.snk
dotnet build Snowflake.Data.Core\Snowflake.Data.Core.csproj -c Release --force -v n /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=%WORKSPACE%\key.snk
dotnet build Snowflake.Data.AWS\Snowflake.Data.AWS.csproj -c Release --force -v n /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=%WORKSPACE%\key.snk
dotnet build Snowflake.Data.Azure\Snowflake.Data.Azure.csproj -c Release --force -v n /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=%WORKSPACE%\key.snk
dotnet build Snowflake.Data.GCP\Snowflake.Data.GCP.csproj -c Release --force -v n /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=%WORKSPACE%\key.snk

"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64"\sn.exe -v %WORKSPACE%"\Snowflake.Data\bin\Release\netstandard2.0\Snowflake.Data.dll"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64"\sn.exe -v %WORKSPACE%"\Snowflake.Data.Core\bin\Release\netstandard2.0\Snowflake.Data.Core.dll"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64"\sn.exe -v %WORKSPACE%"\Snowflake.Data.AWS\bin\Release\netstandard2.0\Snowflake.Data.AWS.dll"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64"\sn.exe -v %WORKSPACE%"\Snowflake.Data.Azure\bin\Release\netstandard2.0\Snowflake.Data.Azure.dll"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64"\sn.exe -v %WORKSPACE%"\Snowflake.Data.GCP\bin\Release\netstandard2.0\Snowflake.Data.GCP.dll"

dotnet pack Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n --no-build --output %ROOT_DIR%
dotnet pack Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n --output %ROOT_DIR%
dotnet pack Snowflake.Data.Core\Snowflake.Data.Core.csproj -c Release --force -v n --output %ROOT_DIR%
dotnet pack Snowflake.Data.AWS\Snowflake.Data.AWS.csproj -c Release --force -v n --output %ROOT_DIR%
dotnet pack Snowflake.Data.Azure\Snowflake.Data.Azure.csproj -c Release --force -v n --output %ROOT_DIR%
dotnet pack Snowflake.Data.GCP\Snowflake.Data.GCP.csproj -c Release --force -v n --output %ROOT_DIR%

dotnet nuget push Snowflake.Data.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
@REM dotnet nuget push Snowflake.Data.Core.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
@REM dotnet nuget push Snowflake.Data.AWS.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
@REM dotnet nuget push Snowflake.Data.Azure.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
@REM dotnet nuget push Snowflake.Data.GCP.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
@REM dotnet nuget push Snowflake.Data.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
Loading
Loading