File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 185185 assert_success
186186 assert_output " No resources found."
187187
188+ # Test complex selectors with matchExpressions (regression test for server-side over-filtering)
189+ jmp create lease --selector ' example.com/firmware=v2,!experimental' --duration 1d
190+
191+ # Partial match: filter with just matchLabels (subset) → should match
192+ run jmp get leases --selector ' example.com/firmware=v2' -o yaml
193+ assert_success
194+ assert_output --partial " example.com/firmware=v2"
195+
196+ # Partial match: filter with just matchExpressions (subset) → should match
197+ # This specifically tests client-side filtering of matchExpressions
198+ run jmp get leases --selector ' !experimental' -o yaml
199+ assert_success
200+ assert_output --partial " !experimental"
201+
202+ # Non-matching matchExpressions → should NOT match
203+ run jmp get leases --selector ' !production'
204+ assert_success
205+ assert_output " No resources found."
206+
207+ # Filter asks for more than lease has → should NOT match
208+ run jmp get leases --selector ' example.com/firmware=v2,!experimental,region=us'
209+ assert_success
210+ assert_output " No resources found."
211+
188212 jmp delete leases --all
189213}
190214
You can’t perform that action at this time.
0 commit comments