File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 22
22
from weaviate .exceptions import WeaviateInvalidInputError , WeaviateUnsupportedFeatureError
23
23
24
24
25
+ def test_shards_on_tenants (client_factory : ClientFactory , collection_factory : CollectionFactory ):
26
+ collection = collection_factory (
27
+ vectorizer_config = Configure .Vectorizer .none (),
28
+ multi_tenancy_config = Configure .multi_tenancy (enabled = True ),
29
+ )
30
+ collection .tenants .create (Tenant (name = "tenant1" ))
31
+ client = client_factory ()
32
+ count = sum (
33
+ len (node .shards ) for node in client .cluster .nodes (collection .name , output = "verbose" )
34
+ )
35
+
36
+ assert count == 1
37
+
38
+
25
39
@pytest .mark .parametrize ("tenant" , ["tenant1" , Tenant (name = "tenant1" )])
26
40
def test_delete_by_id_tenant (
27
41
collection_factory : CollectionFactory , tenant : Union [str , Tenant ]
You can’t perform that action at this time.
0 commit comments