From 4b5c5d1c7aaebffd6e07db0c4b0d8e79b648bcbb Mon Sep 17 00:00:00 2001 From: Dominic Kim Date: Mon, 5 Feb 2024 15:26:48 +0900 Subject: [PATCH] Fix unit test cases (#5459) --- .../kubernetes/test/WhiskPodBuilderTests.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/WhiskPodBuilderTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/WhiskPodBuilderTests.scala index d15c5803a89..ea7be1b9a14 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/WhiskPodBuilderTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/kubernetes/test/WhiskPodBuilderTests.scala @@ -139,8 +139,8 @@ class WhiskPodBuilderTests extends FlatSpec with Matchers with KubeClientSupport val (pod, _) = builder.buildPodSpec(name, testImage, 2.MB, Map("foo" -> "bar"), Map("fooL" -> "barV"), config) withClue(Serialization.asYaml(pod)) { val c = getActionContainer(pod) - c.getResources.getLimits.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("1024Mi") - c.getResources.getRequests.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("1024Mi") + c.getResources.getLimits.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("1024") + c.getResources.getRequests.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("1024") } } it should "scale ephemeral storage when scale factor is given" in { @@ -159,8 +159,8 @@ class WhiskPodBuilderTests extends FlatSpec with Matchers with KubeClientSupport val (pod, _) = builder.buildPodSpec(name, testImage, 2.MB, Map("foo" -> "bar"), Map("fooL" -> "barV"), config) withClue(Serialization.asYaml(pod)) { val c = getActionContainer(pod) - c.getResources.getLimits.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("2.5Mi") - c.getResources.getRequests.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("2.5Mi") + c.getResources.getLimits.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("2.5") + c.getResources.getRequests.asScala.get("ephemeral-storage").map(_.getAmount) shouldBe Some("2.5") } } it should "use ephemeral storage limit when scale factor suggests larger size" in {