File tree Expand file tree Collapse file tree 3 files changed +2
-20
lines changed
SpecTests/ClientSideEncryption Expand file tree Collapse file tree 3 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -1827,9 +1827,7 @@ public function testQueryableEncryption(): void
1827
1827
$ this ->markTestSkipped ('Explicit encryption tests require MongoDB 7.0 or later ' );
1828
1828
}
1829
1829
1830
- if (! $ this ->isEnterprise ()) {
1831
- $ this ->markTestSkipped ('Automatic encryption requires MongoDB Enterprise ' );
1832
- }
1830
+ $ this ->skipIfClientSideEncryptionIsNotSupported ();
1833
1831
1834
1832
// Fetch names for the database and collection under test
1835
1833
$ 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,9 +31,7 @@ public function setUp(): void
31
31
{
32
32
parent ::setUp ();
33
33
34
- if (! $ this ->isEnterprise ()) {
35
- $ this ->markTestSkipped ('Automatic data encryption key tests require MongoDB enterprise ' );
36
- }
34
+ $ this ->skipIfClientSideEncryptionIsNotSupported ();
37
35
38
36
if ($ this ->isStandalone () || ($ this ->isShardedCluster () && ! $ this ->isShardedClusterUsingReplicasets ())) {
39
37
$ this ->markTestSkipped ('Automatic data encryption key tests require replica sets ' );
You can’t perform that action at this time.
0 commit comments