Skip to content

Commit 7663686

Browse files
committed
Polishing.
Guard tests for encryption functionality. Original Pull Request: #4885
1 parent 7390716 commit 7663686

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/encryption/MongoQueryableEncryptionCollectionCreationTests.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515
*/
1616
package org.springframework.data.mongodb.core.encryption;
1717

18-
import static org.springframework.data.mongodb.core.schema.JsonSchemaProperty.encrypted;
19-
import static org.springframework.data.mongodb.core.schema.JsonSchemaProperty.int32;
20-
import static org.springframework.data.mongodb.core.schema.JsonSchemaProperty.int64;
21-
import static org.springframework.data.mongodb.core.schema.JsonSchemaProperty.queryable;
22-
import static org.springframework.data.mongodb.core.schema.QueryCharacteristics.range;
23-
import static org.springframework.data.mongodb.test.util.Assertions.assertThat;
18+
import static org.springframework.data.mongodb.core.schema.JsonSchemaProperty.*;
19+
import static org.springframework.data.mongodb.core.schema.QueryCharacteristics.*;
20+
import static org.springframework.data.mongodb.test.util.Assertions.*;
2421

2522
import java.util.List;
2623
import java.util.UUID;
@@ -34,6 +31,7 @@
3431
import org.junit.jupiter.params.ParameterizedTest;
3532
import org.junit.jupiter.params.provider.Arguments;
3633
import org.junit.jupiter.params.provider.MethodSource;
34+
3735
import org.springframework.beans.factory.annotation.Autowired;
3836
import org.springframework.context.annotation.Configuration;
3937
import org.springframework.data.mongodb.config.AbstractMongoClientConfiguration;
@@ -42,16 +40,20 @@
4240
import org.springframework.data.mongodb.core.schema.JsonSchemaProperty;
4341
import org.springframework.data.mongodb.core.schema.MongoJsonSchema;
4442
import org.springframework.data.mongodb.test.util.Client;
43+
import org.springframework.data.mongodb.test.util.EnableIfMongoServerVersion;
4544
import org.springframework.data.mongodb.test.util.MongoClientExtension;
4645
import org.springframework.test.context.ContextConfiguration;
4746
import org.springframework.test.context.junit.jupiter.SpringExtension;
4847

4948
import com.mongodb.client.MongoClient;
5049

5150
/**
51+
* Integration tests for creating collections with encrypted fields.
52+
*
5253
* @author Christoph Strobl
5354
*/
5455
@ExtendWith({ MongoClientExtension.class, SpringExtension.class })
56+
@EnableIfMongoServerVersion(isGreaterThanEqual = "8.0")
5557
@ContextConfiguration
5658
public class MongoQueryableEncryptionCollectionCreationTests {
5759

0 commit comments

Comments
 (0)