]> git.openstreetmap.org Git - chef.git/blob - test/integration/mysql/serverspec/mysql_spec.rb
88323fe983635123032fb3d13f2de03d2ee285c5
[chef.git] / test / integration / mysql / serverspec / mysql_spec.rb
1 require "serverspec"
2
3 # Required by serverspec
4 set :backend, :exec
5
6 mysql_variant = if os[:family] == "ubuntu"
7                   "mysql"
8                 else
9                   "mariadb"
10                 end
11
12 describe package("#{mysql_variant}-server") do
13   it { should be_installed }
14 end
15
16 describe service("#{mysql_variant}") do
17   it { should be_enabled }
18   it { should be_running }
19 end
20
21 describe port(3306) do
22   it { should be_listening.with("tcp") }
23 end