From a488f6e88103dc1153f52cebe2a5b56dc77e03f4 Mon Sep 17 00:00:00 2001 From: Thomas Mieslinger Date: Tue, 13 Oct 2026 14:14:56 +0200 Subject: [PATCH] test(dim-testsuite): history ipblock filtered by layer3domain Pins down that "history ipblock CIDR layer3domain X" shows only the history of X and that without a layer3domain all of them are shown. history_ipblock() calls query.where() without using the result, which looks like a dropped filter; it is not, SelectProxy.where() updates the select in place. This test makes sure it stays that way. Co-Authored-By: Claude Opus 5.5 --- .../t/history-ipblock-layer3domain-filter.t | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dim-testsuite/t/history-ipblock-layer3domain-filter.t diff --git a/dim-testsuite/t/history-ipblock-layer3domain-filter.t b/dim-testsuite/t/history-ipblock-layer3domain-filter.t new file mode 100644 index 0000000..6d6da6e --- /dev/null +++ b/dim-testsuite/t/history-ipblock-layer3domain-filter.t @@ -0,0 +1,20 @@ +# "history ipblock CIDR layer3domain X" shows only the history of X; without a +# layer3domain the history of all layer3domains is shown. +$ ndcli create layer3domain two type vrf rd 0:2 +$ ndcli create container 10.0.0.0/8 layer3domain default +INFO - Creating container 10.0.0.0/8 in layer3domain default +$ ndcli create container 10.0.0.0/8 layer3domain two +INFO - Creating container 10.0.0.0/8 in layer3domain two + +$ ndcli history ipblock 10.0.0.0/8 layer3domain two +timestamp user tool originating_ip objclass name action +2019-01-15 11:06:07.659774 admin native 127.0.0.1 ipblock 10.0.0.0/8 created in layer3domain two + +$ ndcli history ipblock 10.0.0.0/8 layer3domain default +timestamp user tool originating_ip objclass name action +2019-01-15 11:06:07.509940 admin native 127.0.0.1 ipblock 10.0.0.0/8 created in layer3domain default + +$ ndcli history ipblock 10.0.0.0/8 +timestamp user tool originating_ip objclass name action +2019-01-15 11:06:07.659774 admin native 127.0.0.1 ipblock 10.0.0.0/8 created in layer3domain two +2019-01-15 11:06:07.509940 admin native 127.0.0.1 ipblock 10.0.0.0/8 created in layer3domain default