Skip to content

Commit 02076b5

Browse files
committed
test(collections): add umbrella test for all property types
1 parent f7bef50 commit 02076b5

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

src/it/java/io/weaviate/integration/CollectionsITest.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.weaviate.integration;
22

33
import java.io.IOException;
4+
import java.util.ArrayList;
45

56
import org.assertj.core.api.Assertions;
67
import org.assertj.core.api.InstanceOfAssertFactories;
@@ -510,4 +511,39 @@ public void test_asyncReplicationConfig() throws IOException {
510511
.returns(13, AsyncReplicationConfig::propagationConcurrency)
511512
.returns(14, AsyncReplicationConfig::propagationBatchSize);
512513
}
514+
515+
@Test
516+
public void test_properties() {
517+
Assertions.assertThatCode(() -> {
518+
var properties = new ArrayList<Property>() {
519+
{
520+
add(Property.textArray("prop_textArray"));
521+
add(Property.integer("prop_integer"));
522+
add(Property.integerArray("prop_integerArray"));
523+
add(Property.number("prop_number"));
524+
add(Property.numberArray("prop_numberArray"));
525+
add(Property.bool("prop_bool"));
526+
add(Property.boolArray("prop_boolArray"));
527+
add(Property.blob("prop_blob"));
528+
add(Property.date("prop_date"));
529+
add(Property.dateArray("prop_dateArray"));
530+
add(Property.uuid("prop_uuid"));
531+
add(Property.uuidArray("prop_uuidArray"));
532+
add(Property.object("prop_object",
533+
p -> p.nestedProperties(Property.text("foo"))));
534+
add(Property.objectArray("prop_objectArray",
535+
p -> p.nestedProperties(Property.text("foo"))));
536+
add(Property.phoneNumber("prop_phoneNumber"));
537+
add(Property.geoCoordinates("prop_geoCoordinates"));
538+
}
539+
};
540+
541+
requireAtLeast(Weaviate.Version.V137, () -> {
542+
properties.add(Property.blobHash("prop_blobHash"));
543+
});
544+
545+
client.collections.create(
546+
ns("Things"), col -> col.properties(properties));
547+
}).doesNotThrowAnyException();
548+
}
513549
}

0 commit comments

Comments
 (0)