示例#1
0
    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')
示例#2
0
    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')
示例#3
0
 def test_no_insufficient_args(self):
     try:
         df_monitor.build_command(['df_monitor'])
         self.fail('Should raise SystemExit')
     except:
         SystemExit