Skip to content

Commit 34938f8

Browse files
Fix DocumentHandlerTests
1 parent 19f30b4 commit 34938f8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/src/test/scala/org/apache/openwhisk/core/database/test/DocumentHandlerTests.scala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import spray.json.DefaultJsonProtocol._
2828
import spray.json._
2929
import org.apache.openwhisk.common.TransactionId
3030
import org.apache.openwhisk.core.database.SubjectHandler.SubjectView
31-
import org.apache.openwhisk.core.database.WhisksHandler.ROOT_NS
31+
import org.apache.openwhisk.core.database.WhisksHandler.{FULL_NAME, ROOT_NS}
3232
import org.apache.openwhisk.core.database._
3333
import org.apache.openwhisk.core.entity._
3434

@@ -48,14 +48,18 @@ class DocumentHandlerTests extends FlatSpec with Matchers with ScalaFutures with
4848

4949
it should "return JsObject when namespace is simple name" in {
5050
WhisksHandler.computedFields(JsObject(("namespace", JsString("foo")))) shouldBe JsObject((ROOT_NS, JsString("foo")))
51-
WhisksHandler.computedFields(newRule("foo").toDocumentRecord) shouldBe JsObject((ROOT_NS, JsString("foo")))
51+
WhisksHandler.computedFields(newRule("foo").toDocumentRecord) shouldBe JsObject(
52+
(ROOT_NS, JsString("foo")),
53+
(FULL_NAME, JsString("foo/foo")))
5254
}
5355

5456
it should "return JsObject when namespace is path" in {
5557
WhisksHandler.computedFields(JsObject(("namespace", JsString("foo/bar")))) shouldBe
5658
JsObject((ROOT_NS, JsString("foo")))
5759

58-
WhisksHandler.computedFields(newRule("foo/bar").toDocumentRecord) shouldBe JsObject((ROOT_NS, JsString("foo")))
60+
WhisksHandler.computedFields(newRule("foo/bar").toDocumentRecord) shouldBe JsObject(
61+
(ROOT_NS, JsString("foo")),
62+
(FULL_NAME, JsString("foo/bar/foo")))
5963
}
6064

6165
private def newRule(ns: String): WhiskRule = {

0 commit comments

Comments
 (0)