mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
Force SSL and Multi SSL (#456)
This commit is contained in:
@ -48,12 +48,17 @@ public function test_letsencrypt_ssl()
|
||||
])
|
||||
->assertSuccessful();
|
||||
|
||||
$ssl = Ssl::query()->where('site_id', $this->site->id)->first();
|
||||
$this->assertNotEmpty($ssl);
|
||||
|
||||
$this->assertDatabaseHas('ssls', [
|
||||
'site_id' => $this->site->id,
|
||||
'type' => SslType::LETSENCRYPT,
|
||||
'status' => SslStatus::CREATED,
|
||||
'domains' => json_encode([$this->site->domain]),
|
||||
'email' => 'ssl@example.com',
|
||||
'certificate_path' => '/etc/letsencrypt/live/'.$ssl->id.'/fullchain.pem',
|
||||
'pk_path' => '/etc/letsencrypt/live/'.$ssl->id.'/privkey.pem',
|
||||
]);
|
||||
}
|
||||
|
||||
@ -101,10 +106,16 @@ public function test_custom_ssl()
|
||||
])
|
||||
->assertSuccessful();
|
||||
|
||||
$ssl = Ssl::query()->where('site_id', $this->site->id)->first();
|
||||
$this->assertNotEmpty($ssl);
|
||||
|
||||
$this->assertDatabaseHas('ssls', [
|
||||
'site_id' => $this->site->id,
|
||||
'type' => SslType::CUSTOM,
|
||||
'status' => SslStatus::CREATED,
|
||||
'domains' => json_encode([$this->site->domain]),
|
||||
'certificate_path' => '/etc/ssl/'.$ssl->id.'/cert.pem',
|
||||
'pk_path' => '/etc/ssl/'.$ssl->id.'/privkey.pem',
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user