Mock out the tempmon client restart action when testing

This commit is contained in:
Lance Edgar 2019-06-15 17:31:29 -05:00
parent d42f6a065b
commit a0ba89ecfd

View file

@ -24,7 +24,10 @@ class TempmonClientView(BaseTempmonClientView):
return client.config_key == 'demo' return client.config_key == 'demo'
def get_restart_cmd(self, client): def get_restart_cmd(self, client):
return ['ssh', 'demo.rattailproject.org', 'sudo service demo-tempmon-client restart'] if self.rattail_config.production():
return ['ssh', 'demo.rattailproject.org', 'sudo service demo-tempmon-client restart']
# just mock it out when testing
return ['sleep', '2']
class TempmonProbeView(BaseTempmonProbeView): class TempmonProbeView(BaseTempmonProbeView):