From 331e45926de1e31306feb27ac27d428c840f666f Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Tue, 23 May 2023 17:26:02 +0900 Subject: [PATCH] test: follow specific uid/gid migration on debian Signed-off-by: Kentaro Hayashi --- serverspec/linux/td-agent.rb | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/serverspec/linux/td-agent.rb b/serverspec/linux/td-agent.rb index 9f02e61a2..a50dd3772 100644 --- a/serverspec/linux/td-agent.rb +++ b/serverspec/linux/td-agent.rb @@ -7,13 +7,24 @@ it { should be_installed } end -describe user("td-agent") do - it { should exist } - it { should belong_to_group "td-agent" } -end +if os[:family] == 'redhat' + describe user("fluentd") do + it { should exist } + it { should belong_to_group "fluentd" } + end + + describe group("fluentd") do + it { should exist } + end +else + describe user("_fluentd") do + it { should exist } + it { should belong_to_group "_fluentd" } + end -describe group("td-agent") do - it { should exist } + describe group("_fluentd") do + it { should exist } + end end describe "gem files" do