Skip to content

Commit

Permalink
Fix breakpoint agent flag (#3447)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored Apr 3, 2019
1 parent 85d1ef5 commit 1bdc329
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions datadog_checks_dev/datadog_checks/dev/tooling/e2e/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ def base_mount_dir(self):

@property
def agent_command(self):
return 'docker exec {} {}'.format(
self.container_name,
get_agent_exe(self.agent_version)
)
return get_agent_exe(self.agent_version)

def exec_command(self, command, **kwargs):
cmd = 'docker exec'

if kwargs.pop('interactive', False):
cmd += ' -it'

cmd += ' {}'.format(self.container_name)
cmd += ' {}'.format(command)

return run_command(cmd, **kwargs)

def run_check(
self,
Expand Down Expand Up @@ -91,7 +99,7 @@ def run_check(
if break_point is not None:
command += ' --breakpoint {}'.format(break_point)

return run_command(command, capture=capture)
return self.exec_command(command, capture=capture, interactive=break_point is not None)

def exists(self):
return env_exists(self.check, self.env)
Expand Down

0 comments on commit 1bdc329

Please sign in to comment.