def test_build_command_with_instance(self): command = df_monitor.build_command(['df_monitor', '-i 3', '/var/folders/hd/5yqz2v2d3sxd3n879f4sg4gr0000gn/T/spring-cloud-dataflow-6604445305486891830/test-1496419405564/test.log']) self.assertEqual(command, 'tail -f /var/folders/hd/5yqz2v2d3sxd3n879f4sg4gr0000gn/T/spring-cloud-dataflow-6604445305486891830/test-1496419405564/test.log/stdout_3.log')
def test_build_less_command(self): command = df_monitor.build_command(['df_monitor', '--less', '/var/folders/hd/5yqz2v2d3sxd3n879f4sg4gr0000gn/T/spring-cloud-dataflow-6604445305486891830/test-1496419405564/test.log']) self.assertEqual(command, 'less /var/folders/hd/5yqz2v2d3sxd3n879f4sg4gr0000gn/T/spring-cloud-dataflow-6604445305486891830/test-1496419405564/test.log/stdout_0.log')
def test_no_insufficient_args(self): try: df_monitor.build_command(['df_monitor']) self.fail('Should raise SystemExit') except: SystemExit