test: only assert genuinely invalid read-preference values at request ingresses (#9576)

The flow and nested-MergeScan ingress tests hardcoded "follower" among
the read-preference values that must be rejected, coupling them to the
current leader-only ReadPreference enum. Assert only genuinely invalid
values there, matching the wire-values test which already limits itself
to ["", "unknown"]. This keeps the ingress tests valid for builds that
extend ReadPreference with more variants.

Signed-off-by: Ning Sun <sunning@greptime.com>
This commit is contained in:
Ning Sun
2026-10-14 12:49:56 +00:00
committed by GitHub
parent 3b442adba2
commit 40770ddb72
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1170,7 +1170,7 @@ mod tests {
response.unwrap_err().status_code()
);
for value in ["", "unknown", "follower"] {
for value in ["", "unknown"] {
let mut query_context =
api::v1::QueryContext::from(session::context::QueryContext::arc().as_ref());
query_context.extensions.insert(
@@ -158,7 +158,7 @@ async fn test_nested_merge_scan_capability_rejects_internal_read_preference() {
.map(|id| (*id, rpc_requests(&cluster, *id)))
.collect::<BTreeMap<_, _>>();
for value in ["", "invalid", "follower"] {
for value in ["", "invalid"] {
let mut header = region_request_header(&query_ctx);
header
.query_context