From 6acb359c09b4712caf102d03bdbe4720459adb79 Mon Sep 17 00:00:00 2001 From: Chan9390 Date: Wed, 19 Jul 2017 17:42:49 +0530 Subject: [PATCH] Updated mysql.rb --- chef/cookbooks/metasploitable/test/windows/mysql.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chef/cookbooks/metasploitable/test/windows/mysql.rb b/chef/cookbooks/metasploitable/test/windows/mysql.rb index b507e5d..da7ee87 100644 --- a/chef/cookbooks/metasploitable/test/windows/mysql.rb +++ b/chef/cookbooks/metasploitable/test/windows/mysql.rb @@ -2,11 +2,13 @@ control "mysql" do title "MySQL" desc "Check if MySQL is running properly. Installation script available at /scripts/installs/setup_mysql.bat" - describe command('sc query wampmysqld') do - its('stdout') { should match "STATE : 4 RUNNING" } + describe service('wampmysqld') do + it { should be_installed } + it { should be_enabled } + it { should be_running } end - describe command('netstat -aob | findstr :3306') do - its('stdout') { should match "LISTENING" } + describe port('3306') do + it { should be_listening } end end