From db6714ece47f6477830e6b1c397221232a233c3f Mon Sep 17 00:00:00 2001
From: Yaroslav Dynnikov <yaroslav.dynnikov@gmail.com>
Date: Fri, 13 Sep 2024 00:11:27 +0300
Subject: [PATCH] test: one more case for test_cas_predicate

---
 test/int/test_cas.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/int/test_cas.py b/test/int/test_cas.py
index 0ccc804ec1..04883bd3c0 100644
--- a/test/int/test_cas.py
+++ b/test/int/test_cas.py
@@ -230,6 +230,20 @@ def test_cas_predicate(instance: Instance):
         f"ConflictFound: found a conflicting entry at index {read_index+1}",
     )
 
+    # CaS rejected via the explicit predicate, even though implicit range doesn't match
+    with pytest.raises(TarantoolError) as e6:
+        instance.cas(
+            "insert",
+            "_pico_property",
+            ["animal", "chicken"],
+            index=read_index,
+            ranges=[CasRange(eq="fruit")],
+        )
+    assert e6.value.args[:2] == (
+        ErrorCode.CasConflictFound,
+        f"ConflictFound: found a conflicting entry at index {read_index+1}",
+    )
+
     # Stale index, yet successful insert of another key
     ret = instance.cas(
         "insert",
-- 
GitLab