aboutsummaryrefslogtreecommitdiff
path: root/plugin/pkg/replacer/replacer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/pkg/replacer/replacer_test.go')
-rw-r--r--plugin/pkg/replacer/replacer_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/pkg/replacer/replacer_test.go b/plugin/pkg/replacer/replacer_test.go
index 28bb08d7a..aa8ac6fd2 100644
--- a/plugin/pkg/replacer/replacer_test.go
+++ b/plugin/pkg/replacer/replacer_test.go
@@ -256,6 +256,12 @@ func TestLabels(t *testing.T) {
if repl != expect[lbl] {
t.Errorf("Expected value %q, got %q", expect[lbl], repl)
}
+
+ // test empty state and nil recorder won't panic
+ repl_empty := replacer.Replace(ctx, request.Request{}, nil, lbl)
+ if repl_empty != EmptyValue {
+ t.Errorf("Expected empty value %q, got %q", EmptyValue, repl_empty)
+ }
}
}