This repository was archived by the owner on Feb 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2323 cp /etc/init.d/go-agent /etc/init.d/#{ agent_name }
2424 sed -i 's/# Provides: go-agent$/# Provides: #{ agent_name } /g' /etc/init.d/#{ agent_name }
2525 EOH
26- only_if "grep -q '# Provides: go-agent $' /etc/init.d/#{ agent_name } "
27- not_if { agent_name = = 'go-agent' }
26+ not_if "grep -q '# Provides: #{ agent_name } $' /etc/init.d/#{ agent_name } "
27+ only_if { agent_name ! = 'go-agent' }
2828 end
2929 link "/usr/share/#{ agent_name } " do
3030 to "/usr/share/go-agent"
Original file line number Diff line number Diff line change 1212 end
1313 before do
1414 stub_command ( "grep -q '# Provides: go-agent$' /etc/init.d/go-agent" ) . and_return ( false )
15- stub_command ( "grep -q '# Provides: go-agent$' /etc/init.d/my-go-agent" ) . and_return ( false )
15+ stub_command ( "grep -q '# Provides: my- go-agent$' /etc/init.d/my-go-agent" ) . and_return ( false )
1616 end
1717
1818 it_behaves_like :agent_linux_install
Original file line number Diff line number Diff line change 9898 end
9999 before do
100100 stub_command ( "grep -q '# Provides: go-agent$' /etc/init.d/go-agent" ) . and_return ( false )
101- stub_command ( "grep -q '# Provides: go-agent$' /etc/init.d/go-agent-1" ) . and_return ( true )
101+ stub_command ( "grep -q '# Provides: go-agent-1 $' /etc/init.d/go-agent-1" ) . and_return ( false )
102102 end
103103 it_behaves_like :agent_recipe
104104 it_behaves_like :apt_repository_recipe
You can’t perform that action at this time.
0 commit comments