From e97448137762a102a88513716c140d8109234b0b Mon Sep 17 00:00:00 2001 From: Saar Shen Date: Wed, 4 Dec 2024 15:54:50 -0800 Subject: [PATCH] Bookkeeping unit tests --- tests/UnitTests/PodInfoManagerTests.cs | 8 ++++---- tests/UnitTests/UnitTests.csproj | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/UnitTests/PodInfoManagerTests.cs b/tests/UnitTests/PodInfoManagerTests.cs index 06370d16..bdde329e 100644 --- a/tests/UnitTests/PodInfoManagerTests.cs +++ b/tests/UnitTests/PodInfoManagerTests.cs @@ -31,7 +31,7 @@ public async Task GetMyPodAsyncShouldGetCorrectPod() containerIdHolderMock.Setup(c => c.ContainerId).Returns("containerId"); PodInfoManager target = new PodInfoManager(k8sQueryClientMock.Object, containerIdHolderMock.Object, new IPodNameProvider[] { podNameProviderMock.Object }); - V1Pod result = await target.GetMyPodAsync(default).ConfigureAwait(false); + V1Pod result = await target.GetMyPodAsync(default); Assert.NotNull(result); Assert.Single(result.Status.ContainerStatuses); @@ -58,7 +58,7 @@ public async Task GetMyPodAsyncShouldLeveragePodNameProviders() k8sQueryClientMock.Setup(c => c.GetPodByNameAsync(It.IsAny(), It.IsAny())).Returns(Task.FromResult(podsArray.FirstOrDefault(item => item.Metadata.Name == providerPodName))); PodInfoManager target = new PodInfoManager(k8sQueryClientMock.Object, containerIdHolderMock.Object, new IPodNameProvider[] { podNameProviderMock.Object }); - V1Pod result = await target.GetMyPodAsync(default).ConfigureAwait(false); + V1Pod result = await target.GetMyPodAsync(default); Assert.NotNull(result); Assert.Single(result.Status.ContainerStatuses); @@ -88,7 +88,7 @@ public async Task GetMyPodAsyncShouldFallbackToUseContainerIdWhenProvidedPodName containerIdHolderMock.Setup(c => c.ContainerId).Returns(targetContainerId); PodInfoManager target = new PodInfoManager(k8sQueryClientMock.Object, containerIdHolderMock.Object, new IPodNameProvider[] { podNameProviderMock.Object }); - V1Pod result = await target.GetMyPodAsync(default).ConfigureAwait(false); + V1Pod result = await target.GetMyPodAsync(default); Assert.NotNull(result); Assert.Single(result.Status.ContainerStatuses); @@ -119,7 +119,7 @@ public async Task GetMyPodAsyncShouldSupportMultipleIPodNameProviders() podNameProviderMock2.Setup(p => p.TryGetPodName(out providerPodName2)).Returns(true); // the provider returns true with pod name. PodInfoManager target = new PodInfoManager(k8sQueryClientMock.Object, containerIdHolderMock.Object, new IPodNameProvider[] { podNameProviderMock.Object, podNameProviderMock2.Object }); - V1Pod result = await target.GetMyPodAsync(default).ConfigureAwait(false); + V1Pod result = await target.GetMyPodAsync(default); Assert.NotNull(result); Assert.Single(result.Status.ContainerStatuses); diff --git a/tests/UnitTests/UnitTests.csproj b/tests/UnitTests/UnitTests.csproj index 5ae98172..a9c95ae5 100644 --- a/tests/UnitTests/UnitTests.csproj +++ b/tests/UnitTests/UnitTests.csproj @@ -11,7 +11,7 @@ - +