test: update create-index default contract coverage

This commit is contained in:
ChilePiquin
2026-09-03 15:52:46 -07:00
parent bd86cc5aa6
commit 477a49cecb
3 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ If this is false, and another index already exists on the same columns
and the same name, then an error will be returned. This is true even if
that index is out of date.
The default is true
The default is false
***
+1 -1
View File
@@ -834,7 +834,7 @@ def test_table_create_indices():
vector_req = received_requests[2]
assert "name" in vector_req
assert vector_req["name"] == "custom_vector_idx"
assert "replace" not in vector_req
assert vector_req["replace"] is False
table.wait_for_index(["custom_scalar_idx"], timedelta(seconds=2))
table.wait_for_index(
+12
View File
@@ -6306,6 +6306,7 @@ mod tests {
let mut expected_body = expected_body.clone();
expected_body["column"] = "a".into();
expected_body[INDEX_TYPE_KEY] = index_type.into();
expected_body["replace"] = false.into();
assert_eq!(body, expected_body);
@@ -6615,38 +6616,46 @@ mod tests {
json!({
"column": "rowId",
"index_type": "BTREE",
"replace": false,
}),
json!({
"column": "`row-id`",
"index_type": "BTREE",
"replace": false,
}),
json!({
"column": "userId",
"index_type": "BTREE",
"replace": false,
}),
json!({
"column": "MetaData.userId",
"index_type": "BTREE",
"replace": false,
}),
json!({
"column": "metadata.user_id",
"index_type": "BTREE",
"replace": false,
}),
json!({
"column": "image.embedding",
"index_type": "IVF_PQ",
"metric_type": "l2",
"replace": false,
}),
{
let mut body = serde_json::to_value(InvertedIndexParams::default()).unwrap();
body["column"] = "payload.text".into();
body["index_type"] = "FTS".into();
body["replace"] = false.into();
body
},
{
let mut body = serde_json::to_value(InvertedIndexParams::default()).unwrap();
body["column"] = "docs.content".into();
body["index_type"] = "FTS".into();
body["replace"] = false.into();
body
},
{
@@ -6654,15 +6663,18 @@ mod tests {
body["column"] = "docs.content".into();
body["index_type"] = "FTS".into();
body["document_granularity"] = "list_element".into();
body["replace"] = false.into();
body
},
json!({
"column": "`meta-data`.`user-id`",
"index_type": "BTREE",
"replace": false,
}),
json!({
"column": "literal.`a.b`",
"index_type": "BTREE",
"replace": false,
}),
]);
let request_idx = Arc::new(AtomicUsize::new(0));