]> git.openstreetmap.org Git - chef.git/blobdiff - test/integration/mysql/inspec/mysql_spec.rb
Switch to using inspec for testing
[chef.git] / test / integration / mysql / inspec / mysql_spec.rb
diff --git a/test/integration/mysql/inspec/mysql_spec.rb b/test/integration/mysql/inspec/mysql_spec.rb
new file mode 100644 (file)
index 0000000..549f33d
--- /dev/null
@@ -0,0 +1,19 @@
+mysql_variant = if os.name == "ubuntu"
+                  "mysql"
+                else
+                  "mariadb"
+                end
+
+describe package("#{mysql_variant}-server") do
+  it { should be_installed }
+end
+
+describe service("#{mysql_variant}") do
+  it { should be_enabled }
+  it { should be_running }
+end
+
+describe port(3306) do
+  it { should be_listening }
+  its("protocols") { should cmp "tcp" }
+end