aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/test
diff options
context:
space:
mode:
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
+ }
}
}