Server should_notの使い方のサンプル
環境
AlmaLinux release 9.2 (Turquoise Kodkod)
Serverspec
構文
describe service('サービス名') do
it { should_not be_running }
it { should_not be_enabled }
end
インストールされていないことを確認するには、should_notを使います。
使用例
describe service('iptables') do
it { should_not be_running }
it { should_not be_enabled }
end