From 1f71cae591c7adf0f31df7537bebd4f85c5923c2 Mon Sep 17 00:00:00 2001 From: sfc-gh-ext-simba-lf Date: Fri, 6 Oct 2023 13:58:33 -0700 Subject: [PATCH 1/2] SNOW-723810: Add coverage for StorageClient --- .../StorageClient/ISFRemoteStorageClient.cs | 22 +++++------ .../StorageClient/SFStorageClientUtil.cs | 39 ------------------- 2 files changed, 11 insertions(+), 50 deletions(-) delete mode 100644 Snowflake.Data/Core/FileTransfer/StorageClient/SFStorageClientUtil.cs diff --git a/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs b/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs index b20907d9a..3b688d224 100644 --- a/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs +++ b/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs @@ -11,29 +11,29 @@ namespace Snowflake.Data.Core.FileTransfer { internal class WrappedContentInfo { - public string KeyId; - public string EncryptedKey; - public string Algorithm; + public string KeyId { get; set; } + public string EncryptedKey { get; set; } + public string Algorithm { get; set; } } internal class EncryptionAgentInfo { - public string Protocol; - public string EncryptionAlgorithm; + public string Protocol { get; set; } + public string EncryptionAlgorithm { get; set; } } internal class KeyWrappingMetadataInfo { - public string EncryptionLibrary; + public string EncryptionLibrary { get; set; } } internal class EncryptionData { - public string EncryptionMode; - public WrappedContentInfo WrappedContentKey; - public EncryptionAgentInfo EncryptionAgent; - public string ContentEncryptionIV; - public KeyWrappingMetadataInfo KeyWrappingMetadata; + public string EncryptionMode { get; set; } + public WrappedContentInfo WrappedContentKey { get; set; } + public EncryptionAgentInfo EncryptionAgent { get; set; } + public string ContentEncryptionIV { get; set; } + public KeyWrappingMetadataInfo KeyWrappingMetadata { get; set; } } internal class RemoteLocation diff --git a/Snowflake.Data/Core/FileTransfer/StorageClient/SFStorageClientUtil.cs b/Snowflake.Data/Core/FileTransfer/StorageClient/SFStorageClientUtil.cs deleted file mode 100644 index c7d474080..000000000 --- a/Snowflake.Data/Core/FileTransfer/StorageClient/SFStorageClientUtil.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Snowflake.Data.Core.FileTransfer.StorageClient -{ - class SFStorageClientUtil - { - /// - /// The bad request error code. - /// - public static readonly string BAD_REQUEST_ERR = "400"; - - /// - /// The unauthorized error code. - /// - public static readonly string UNAUTHORIZED_ERR = "401"; - - /// - /// The forbidden error code. - /// - public static readonly string FORBIDDEN_ERR = "403"; - - /// - /// The not found error code. - /// - public static readonly string NOT_FOUND_ERR = "404"; - - /// - /// The internal server error code. - /// - public static readonly string INTERNAL_SERVER_ERR = "500"; - - /// - /// The server unavailable error code. - /// - public static readonly string SERVER_UNAVAILABLE_ERR = "503"; - } -} From 9a9eec0b9bdbfe52f5a9972af9ec1fb553105218 Mon Sep 17 00:00:00 2001 From: sfc-gh-ext-simba-lf Date: Wed, 18 Oct 2023 09:28:51 -0700 Subject: [PATCH 2/2] SNOW-723810: Revert get set for storage variables --- .../StorageClient/ISFRemoteStorageClient.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs b/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs index 3b688d224..b20907d9a 100644 --- a/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs +++ b/Snowflake.Data/Core/FileTransfer/StorageClient/ISFRemoteStorageClient.cs @@ -11,29 +11,29 @@ namespace Snowflake.Data.Core.FileTransfer { internal class WrappedContentInfo { - public string KeyId { get; set; } - public string EncryptedKey { get; set; } - public string Algorithm { get; set; } + public string KeyId; + public string EncryptedKey; + public string Algorithm; } internal class EncryptionAgentInfo { - public string Protocol { get; set; } - public string EncryptionAlgorithm { get; set; } + public string Protocol; + public string EncryptionAlgorithm; } internal class KeyWrappingMetadataInfo { - public string EncryptionLibrary { get; set; } + public string EncryptionLibrary; } internal class EncryptionData { - public string EncryptionMode { get; set; } - public WrappedContentInfo WrappedContentKey { get; set; } - public EncryptionAgentInfo EncryptionAgent { get; set; } - public string ContentEncryptionIV { get; set; } - public KeyWrappingMetadataInfo KeyWrappingMetadata { get; set; } + public string EncryptionMode; + public WrappedContentInfo WrappedContentKey; + public EncryptionAgentInfo EncryptionAgent; + public string ContentEncryptionIV; + public KeyWrappingMetadataInfo KeyWrappingMetadata; } internal class RemoteLocation