From ded25c2c77af1ae5b0568fd1e4b160e6491083d9 Mon Sep 17 00:00:00 2001 From: Krzysztof Nozderko Date: Thu, 28 Nov 2024 14:34:41 +0100 Subject: [PATCH] fix typos --- .../UnitTests/PutGetStageInfoTest.cs | 12 ++++++++---- Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs | 2 +- .../Core/FileTransfer/StorageClient/SFGCSClient.cs | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Snowflake.Data.Tests/UnitTests/PutGetStageInfoTest.cs b/Snowflake.Data.Tests/UnitTests/PutGetStageInfoTest.cs index 85a34b222..074d95be5 100644 --- a/Snowflake.Data.Tests/UnitTests/PutGetStageInfoTest.cs +++ b/Snowflake.Data.Tests/UnitTests/PutGetStageInfoTest.cs @@ -1,3 +1,7 @@ +/* + * Copyright (c) 2024 Snowflake Computing Inc. All rights reserved. + */ + using System.Collections.Generic; using NUnit.Framework; using Snowflake.Data.Core; @@ -10,16 +14,16 @@ public class PutGetStageInfoTest { [Test] [TestCaseSource(nameof(TestCases))] - public void TestGcmRegionalUrl(string region, bool useRegionalUrl, string endPoint, string expectedGcmEndpoint) + public void TestGcsRegionalUrl(string region, bool useRegionalUrl, string endPoint, string expectedGcsEndpoint) { // arrange - var stageInfo = CreateGCSStageInfo(region, useRegionalUrl, endPoint); + var stageInfo = CreateGcsStageInfo(region, useRegionalUrl, endPoint); // act var gcsCustomEndpoint = stageInfo.GcsCustomEndpoint(); // assert - Assert.AreEqual(expectedGcmEndpoint, gcsCustomEndpoint); + Assert.AreEqual(expectedGcsEndpoint, gcsCustomEndpoint); } internal static IEnumerable TestCases() @@ -41,7 +45,7 @@ internal static IEnumerable TestCases() yield return new object[] { "US-CENTRAL1", true, "example.com", "example.com" }; } - private PutGetStageInfo CreateGCSStageInfo(string region, bool useRegionalUrl, string endPoint) => + private PutGetStageInfo CreateGcsStageInfo(string region, bool useRegionalUrl, string endPoint) => new PutGetStageInfo { locationType = SFRemoteStorageUtil.GCS_FS, diff --git a/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs b/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs index 599a0b29b..9d336125e 100644 --- a/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs +++ b/Snowflake.Data.Tests/UnitTests/SFGCSClientTest.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2023 Snowflake Computing Inc. All rights reserved. + * Copyright (c) 2012-2024 Snowflake Computing Inc. All rights reserved. */ using System; diff --git a/Snowflake.Data/Core/FileTransfer/StorageClient/SFGCSClient.cs b/Snowflake.Data/Core/FileTransfer/StorageClient/SFGCSClient.cs index b51afed36..e5d0ac139 100644 --- a/Snowflake.Data/Core/FileTransfer/StorageClient/SFGCSClient.cs +++ b/Snowflake.Data/Core/FileTransfer/StorageClient/SFGCSClient.cs @@ -89,9 +89,9 @@ public SFGCSClient(PutGetStageInfo stageInfo) private Google.Cloud.Storage.V1.StorageClient BuildStorageClient(StorageClientBuilder builder, PutGetStageInfo stageInfo) { - var gcmCustomEndpoint = stageInfo.GcsCustomEndpoint(); - if (!string.IsNullOrEmpty(gcmCustomEndpoint)) - builder.BaseUri = gcmCustomEndpoint; + var gcsCustomEndpoint = stageInfo.GcsCustomEndpoint(); + if (!string.IsNullOrEmpty(gcsCustomEndpoint)) + builder.BaseUri = gcsCustomEndpoint; return builder.Build(); }