Skip to content

Commit 699c291

Browse files
committed
remove wrong tests on configuration failure and account for test modules
1 parent d882b26 commit 699c291

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

tests/src/test/scala/kanela/agent/ConfigurationSpec.scala

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,10 @@ import scala.util.Using
2323
import java.util.Collections
2424
import java.util.Enumeration
2525
import java.util.Optional
26+
import scala.jdk.CollectionConverters.ListHasAsScala
2627

2728
class ConfigurationSpec extends munit.FunSuite {
2829

29-
test("should fail to load when there is no configuration") {
30-
val loader = classLoaderWithConfig("")
31-
intercept[RuntimeException] {
32-
Configuration.createFrom(loader)
33-
}
34-
}
35-
3630
test("should load basic configuration settings") {
3731
val loader = classLoaderWithConfig(
3832
"""
@@ -91,8 +85,7 @@ class ConfigurationSpec extends munit.FunSuite {
9185
)
9286

9387
val config = Configuration.createFrom(loader)
94-
val firstModule = config.modules().get(0)
95-
assertEquals(firstModule.name(), "tester module")
88+
val firstModule = config.modules().asScala.find(_.name == "tester module").get
9689
assertEquals(firstModule.description(), Optional.empty[String]())
9790
assertEquals(firstModule.enabled(), true)
9891
assertEquals(firstModule.order(), 1)

0 commit comments

Comments
 (0)