ddragosd commented on a change in pull request #2256: surface errors in 
runtimes.manifest configuration in the controller logs
URL: 
https://github.com/apache/incubator-openwhisk/pull/2256#discussion_r121324422
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/entity/test/ExecManifestTests.scala
 ##########
 @@ -170,4 +176,22 @@ class ExecManifestTests
                     image.localImageName("r", "p", Some("tag")) shouldBe 
s"r/p/$name:tag"
             }
     }
+
+    it should "throw an error when configured manifest is invalid" in {
+        val config_manifest = 
"{\"nodejs\":[{\"kind\":\"nodejs\",\"image\":{\"name\":\"nodejsaction\"},\"deprecated\":true},{\"kind\":\"nodejs:6\",\"default\":true,\"image\":{\"name\":\"nodejs6action\"}}]}"
+        val file = File.createTempFile("cxt", ".txt")
+        file.deleteOnExit()
+
+        val bw = new BufferedWriter(new FileWriter(file))
+        bw.write("runtimes.manifest=" + config_manifest + "\n")
+        bw.close()
+
+        val result = ExecManifest.initialize(new 
WhiskConfig(Map("runtimes.manifest" -> null), Set(), file), true)
+
+        result.isSuccess should be (false)
 
 Review comment:
   done
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to