Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ def test_collection_management(db, bad_db, cluster):
shard_count=2,
shard_fields=["test_attr:"],
replication_factor=1,
shard_like="",
sync_replication=False,
enforce_replication_factor=False,
sharding_strategy="community-compat",
Expand All @@ -236,6 +235,14 @@ def test_collection_management(db, bad_db, cluster):
assert properties["computedValues"] == computed_values
col.configure(computed_values=[])

if cluster:
# Create distribute-shards-like collection
shard_like_name = col_name + "_shards_like"
shard_like_col = db.create_collection(name=shard_like_name, shard_like=col_name)
assert shard_like_col.properties()["shard_like"] == col_name
assert db.has_collection(shard_like_name) is True
assert db.delete_collection(shard_like_name, system=False) is True

# Test create duplicate collection
with assert_raises(CollectionCreateError) as err:
db.create_collection(col_name)
Expand Down