@@ -88,21 +88,21 @@ class WhiskPodBuilderTests extends FlatSpec with Matchers with KubeClientSupport
8888 withClue(Serialization .asYaml(pod)) {
8989 val c = getActionContainer(pod)
9090 // min cpu is: config.millicpus
91- c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 300m " )
91+ c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 300 " )
9292 }
9393
9494 val (pod2, _) = builder.buildPodSpec(name, testImage, 15 .MB , Map (" foo" -> " bar" ), Map (" fooL" -> " barV" ), config)
9595 withClue(Serialization .asYaml(pod2)) {
9696 val c = getActionContainer(pod2)
9797 // max cpu is: config.maxMillicpus
98- c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 1000m " )
98+ c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 1000 " )
9999 }
100100
101101 val (pod3, _) = builder.buildPodSpec(name, testImage, 7 .MB , Map (" foo" -> " bar" ), Map (" fooL" -> " barV" ), config)
102102 withClue(Serialization .asYaml(pod3)) {
103103 val c = getActionContainer(pod3)
104104 // scaled cpu is: action mem/config.mem x config.maxMillicpus
105- c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 600m " )
105+ c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 600 " )
106106 }
107107
108108 val config2 = KubernetesClientConfig (
@@ -139,8 +139,8 @@ class WhiskPodBuilderTests extends FlatSpec with Matchers with KubeClientSupport
139139 val (pod, _) = builder.buildPodSpec(name, testImage, 2 .MB , Map (" foo" -> " bar" ), Map (" fooL" -> " barV" ), config)
140140 withClue(Serialization .asYaml(pod)) {
141141 val c = getActionContainer(pod)
142- c.getResources.getLimits.asScala.get(" ephemeral-storage" ).map(_.getAmount) shouldBe Some (" 1024Mi " )
143- c.getResources.getRequests.asScala.get(" ephemeral-storage" ).map(_.getAmount) shouldBe Some (" 1024Mi " )
142+ c.getResources.getLimits.asScala.get(" ephemeral-storage" ).map(_.getAmount) shouldBe Some (" 1024 " )
143+ c.getResources.getRequests.asScala.get(" ephemeral-storage" ).map(_.getAmount) shouldBe Some (" 1024 " )
144144 }
145145 }
146146
@@ -222,8 +222,8 @@ class WhiskPodBuilderTests extends FlatSpec with Matchers with KubeClientSupport
222222 new EnvVar (" foo" , " bar" , null ),
223223 new EnvVar (" POD_UID" , null , new EnvVarSource (null , new ObjectFieldSelector (null , " metadata.uid" ), null , null ))))
224224
225- c.getResources.getLimits.asScala.get(" memory" ).map(_.getAmount) shouldBe Some (" 10Mi " )
226- c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 900m " )
225+ c.getResources.getLimits.asScala.get(" memory" ).map(_.getAmount) shouldBe Some (" 10 " )
226+ c.getResources.getLimits.asScala.get(" cpu" ).map(_.getAmount) shouldBe Some (" 900 " )
227227 c.getSecurityContext.getCapabilities.getDrop.asScala should contain allOf (" NET_RAW" , " NET_ADMIN" )
228228 c.getPorts.asScala.find(_.getName == " action" ).map(_.getContainerPort) shouldBe Some (8080 )
229229 c.getImage shouldBe testImage
0 commit comments