summaryrefslogtreecommitdiffstats
path: root/standalone-container/src/test/scala
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-09-28 12:22:26 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-09-28 12:22:26 +0200
commit321194bbe4a36d100d92188644d90c6cf4d373c7 (patch)
treedc2056158a3412aad0fda352496d86e6318d8959 /standalone-container/src/test/scala
parentcc406b3dacac9de80d16ed4f56998defce33556f (diff)
Run Application with VespaModel instead of MockRoot
Diffstat (limited to 'standalone-container/src/test/scala')
-rw-r--r--standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainer.scala2
-rw-r--r--standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainerTest.scala6
2 files changed, 4 insertions, 4 deletions
diff --git a/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainer.scala b/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainer.scala
index 7152c0c0af1..f0c2ce6fa0d 100644
--- a/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainer.scala
+++ b/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainer.scala
@@ -32,7 +32,7 @@ object StandaloneContainer {
}
}
- def withContainerModel[T](containerNode: Node)(f: MockRoot => T) {
+ def withContainerModel[T](containerNode: Node)(f: VespaModel => T) {
withTempDirectory { applicationPath =>
createServicesXml(applicationPath, containerNode)
diff --git a/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainerTest.scala b/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainerTest.scala
index 41026e1c263..2705322ab32 100644
--- a/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainerTest.scala
+++ b/standalone-container/src/test/scala/com/yahoo/container/standalone/StandaloneContainerTest.scala
@@ -58,7 +58,7 @@ class StandaloneContainerTest {
</services>
StandaloneContainer.withContainerModel(servicesXml) {
root =>
- assertNotNull(root.getProducer("container-1/standalone"))
+ assertTrue(root.getConfigProducer("container-1/standalone").isPresent)
}
}
@@ -72,10 +72,10 @@ class StandaloneContainerTest {
</jdisc>
StandaloneContainer.withContainerModel(xml) { root =>
- val container = root.getProducer("jdisc/standalone").asInstanceOf[AbstractService]
+ val container = root.getConfigProducer("jdisc/standalone").get().asInstanceOf[AbstractService]
println("portCnt: " + container.getPortCount)
println("numPorts: " + container.getNumPortsAllocated)
- assertThat(container.getNumPortsAllocated, is(1))
+ assertEquals(1, container.getNumPortsAllocated)
}
}