aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/test
diff options
context:
space:
mode:
authorDiego <diegolparra@gmail.com>2014-12-24 18:55:14 -0300
committerDiego <diegolparra@gmail.com>2014-12-24 18:58:12 -0300
commitb997bd76cafa2caece1d55bd26d1e02c4b1ea007 (patch)
tree10807ebbf56c0ec421c9d9632524acc0c4a0fc6d /kamon-core/src/test
parent8af94310494d912c9b09e851601e14cd46890c2a (diff)
downloadKamon-b997bd76cafa2caece1d55bd26d1e02c4b1ea007.tar.gz
Kamon-b997bd76cafa2caece1d55bd26d1e02c4b1ea007.tar.bz2
Kamon-b997bd76cafa2caece1d55bd26d1e02c4b1ea007.zip
= core: include new test case in GlobalPathFilterSpec
Diffstat (limited to 'kamon-core/src/test')
-rw-r--r--kamon-core/src/test/scala/kamon/util/GlobPathFilterSpec.scala14
1 files changed, 13 insertions, 1 deletions
diff --git a/kamon-core/src/test/scala/kamon/util/GlobPathFilterSpec.scala b/kamon-core/src/test/scala/kamon/util/GlobPathFilterSpec.scala
index e0b837f3..47ef4701 100644
--- a/kamon-core/src/test/scala/kamon/util/GlobPathFilterSpec.scala
+++ b/kamon-core/src/test/scala/kamon/util/GlobPathFilterSpec.scala
@@ -40,7 +40,7 @@ class GlobPathFilterSpec extends WordSpecLike with Matchers {
filter.accept("/user/something/otherActor") shouldBe false
}
- "match all expressions in all levels" in {
+ "match all expressions and crosses the path boundaries" in {
val filter = new GlobPathFilter("/user/actor-**")
filter.accept("/user/actor-") shouldBe true
@@ -50,5 +50,17 @@ class GlobPathFilterSpec extends WordSpecLike with Matchers {
filter.accept("/user/something/actor") shouldBe false
filter.accept("/user/something/otherActor")shouldBe false
}
+
+ "match exactly one characterr" in {
+ val filter = new GlobPathFilter("/user/actor-?")
+
+ filter.accept("/user/actor-1") shouldBe true
+ filter.accept("/user/actor-2") shouldBe true
+ filter.accept("/user/actor-3") shouldBe true
+
+ filter.accept("/user/actor-one") shouldBe false
+ filter.accept("/user/actor-two") shouldBe false
+ filter.accept("/user/actor-tree") shouldBe false
+ }
}
}