[Ubuntu] install mysql init script for sysVinit compatibility (#4736)

This commit is contained in:
Mikhail Koliada
2021-12-14 21:46:30 +03:00
committed by GitHub
parent 44d41e873b
commit 9ec86a6e3e
3 changed files with 206 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ Describe "PostgreSQL" {
It "PostgreSQL Service" {
"sudo systemctl start postgresql" | Should -ReturnZeroExitCode
(Get-CommandResult "pg_isready").Output | Should -Be "/var/run/postgresql:5432 - accepting connections"
"sudo systemctl stop postgresql" | Should -ReturnZeroExitCode
"sudo systemctl stop postgresql" | Should -ReturnZeroExitCode
}
It "PostgreSQL version should correspond to the version in the toolset" {
@@ -36,4 +36,11 @@ Describe "MySQL" {
"sudo mysql -vvv -e 'DROP DATABASE smoke_test' -uroot -proot" | Should -ReturnZeroExitCode
"sudo systemctl stop mysql" | Should -ReturnZeroExitCode
}
It "MySQL sysVinit script works" {
sudo /etc/init.d/mysql start | Out-Null
systemctl is-active mysql | Should -Be "active"
sudo /etc/init.d/mysql stop | Out-Null
systemctl is-active mysql | Should -Be "inactive"
}
}