File tree Expand file tree Collapse file tree 3 files changed +3
-17
lines changed
SpecTests/ClientSideEncryption Expand file tree Collapse file tree 3 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -1821,9 +1821,7 @@ public function testQueryableEncryption(): void
1821
1821
$ this ->markTestSkipped ('Explicit encryption tests require MongoDB 7.0 or later ' );
1822
1822
}
1823
1823
1824
- if (! $ this ->isEnterprise ()) {
1825
- $ this ->markTestSkipped ('Automatic encryption requires MongoDB Enterprise ' );
1826
- }
1824
+ $ this ->skipIfClientSideEncryptionIsNotSupported ();
1827
1825
1828
1826
// Fetch names for the database and collection under test
1829
1827
$ collectionName = $ this ->getCollectionName ();
Original file line number Diff line number Diff line change @@ -397,20 +397,6 @@ protected function isApiVersionRequired(): bool
397
397
return isset ($ document ->requireApiVersion ) && $ document ->requireApiVersion === true ;
398
398
}
399
399
400
- protected function isEnterprise (): bool
401
- {
402
- $ buildInfo = $ this ->getPrimaryServer ()->executeCommand (
403
- $ this ->getDatabaseName (),
404
- new Command (['buildInfo ' => 1 ])
405
- )->toArray ()[0 ];
406
-
407
- if (isset ($ buildInfo ->modules ) && is_array ($ buildInfo ->modules )) {
408
- return in_array ('enterprise ' , $ buildInfo ->modules );
409
- }
410
-
411
- throw new UnexpectedValueException ('Could not determine server modules ' );
412
- }
413
-
414
400
protected function isLoadBalanced ()
415
401
{
416
402
return $ this ->getPrimaryServer ()->getType () == Server::TYPE_LOAD_BALANCER ;
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ public function setUp(): void
31
31
{
32
32
parent ::setUp ();
33
33
34
+ $ this ->skipIfClientSideEncryptionIsNotSupported ();
35
+
34
36
if ($ this ->isStandalone () || ($ this ->isShardedCluster () && ! $ this ->isShardedClusterUsingReplicasets ())) {
35
37
$ this ->markTestSkipped ('Automatic data encryption key tests require replica sets ' );
36
38
}
You can’t perform that action at this time.
0 commit comments