When CodeDeploy is not running: `ps -ax | grep "codedeploy-agent: InstanceAgent"` will return: ``` 7443 pts/0 S+ 0:00 grep codedeploy-agent: InstanceAgent ``` When CodeDeploy is running: `ps -ax | grep "codedeploy-agent: InstanceAgent"` will return: ``` 7679 pts/0 Sl 0:00 codedeploy-agent: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 7675 7756 pts/0 S+ 0:00 grep --color=auto codedeploy-agent: InstanceAgent ``` And in either case the test at https://github.com/continuousphp/aws-codedeploy-agent/blob/master/test/integration/aws-codedeploy-agent/serverspec/default_spec.rb#L10 will assert true. A better test would be one which filters out the grep process and only returns the CodeDeploy process if running: `ps -ax | grep "codedeploy-agent: InstanceAgent" | grep -v grep`