File tree 1 file changed +3
-5
lines changed
tests/Unit/Handler/CertificateEngine
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,15 @@ final class OpenSslHandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
25
25
private ITempManager $ tempManager ;
26
26
private OpenSslHandler $ openSslHandler ;
27
27
protected CertificatePolicyService $ certificatePolicyService ;
28
+ private string $ tempDir ;
28
29
public function setUp (): void {
29
30
$ this ->config = \OCP \Server::get (IConfig::class);
30
31
$ this ->appConfig = \OCP \Server::get (IAppConfig::class);
31
32
$ this ->appDataFactory = \OCP \Server::get (IAppDataFactory::class);
32
33
$ this ->dateTimeFormatter = \OCP \Server::get (IDateTimeFormatter::class);
33
34
$ this ->tempManager = \OCP \Server::get (ITempManager::class);
34
35
$ this ->certificatePolicyService = \OCP \Server::get (certificatePolicyService::class);
35
-
36
- // The storage can't be modified when create a new instance to
37
- // don't lost the root cert
38
- vfsStream::setup ('certificate ' );
36
+ $ this ->tempDir = $ this ->tempManager ->getTemporaryFolder ('certificate ' );
39
37
}
40
38
41
39
private function getInstance (): OpenSslHandler {
@@ -47,7 +45,7 @@ private function getInstance(): OpenSslHandler {
47
45
$ this ->tempManager ,
48
46
$ this ->certificatePolicyService ,
49
47
);
50
- $ this ->openSslHandler ->setConfigPath (' vfs://certificate/ ' );
48
+ $ this ->openSslHandler ->setConfigPath ($ this -> tempDir );
51
49
return $ this ->openSslHandler ;
52
50
}
53
51
You can’t perform that action at this time.
0 commit comments