예제 #1
0
 def test_multiple_dash_ds(self):
     args = parse_args(
         self.config, ["-h", "host", "-d", "component", "-d", "component2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual(
         "-h host --parallel=5 --timeout=60 -d component component2",
         canonical)
예제 #2
0
 def test_stopbefore(self):
     args = self.parser.parse_args(["-h", "host", "--stopbefore", "host"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --stopbefore=host --parallel=5", canonical)
예제 #3
0
파일: args.py 프로젝트: dellis23/rollingpin
 def test_restart(self):
     args = self.parser.parse_args(["-h", "host", "-r", "component"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --timeout=60 -r component", canonical)
예제 #4
0
 def test_multiple_commands(self):
     args = parse_args(self.config,
                       ["-h", "host", "-c", "cmd1", "-c", "cmd2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --timeout=60 -c cmd1 -c cmd2",
                      canonical)
예제 #5
0
 def test_multi_restart(self):
     args = parse_args(self.config,
                       ["-h", "host", "-r", "com1", "-r", "com2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --timeout=60 -r com1 -r com2",
                      canonical)
예제 #6
0
 def test_no_harold(self):
     args = parse_args(self.config, ["-h", "host", "--really-no-harold"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual(
         "-h host --parallel=5 --timeout=60 --really-no-harold", canonical)
예제 #7
0
 def test_multiple_hosts(self):
     args = parse_args(self.config, ["-h", "host", "host2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host host2 --parallel=5 --timeout=60", canonical)
예제 #8
0
 def test_restart(self):
     args = self.parser.parse_args(["-h", "host", "-r", "component"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -r component", canonical)
예제 #9
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_single_deploy(self):
     args = self.parser.parse_args(["-h", "host", "-d", "component"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -d component", canonical)
예제 #10
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_no_harold(self):
     args = self.parser.parse_args(["-h", "host", "--no-harold"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --no-harold", canonical)
예제 #11
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_pauseafter(self):
     args = self.parser.parse_args(["-h", "host", "--pauseafter", "2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --pauseafter=2", canonical)
예제 #12
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_sleeptime(self):
     args = self.parser.parse_args(["-h", "host", "--sleeptime", "5"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --sleeptime=5", canonical)
예제 #13
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_stopbefore(self):
     args = self.parser.parse_args(["-h", "host", "--stopbefore", "host"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --stopbefore=host --parallel=5", canonical)
예제 #14
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_multiple_dash_hs(self):
     args = self.parser.parse_args(["-h", "host", "-h", "host2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host host2 --parallel=5", canonical)
예제 #15
0
파일: args.py 프로젝트: dellis23/rollingpin
 def test_simple_command(self):
     args = self.parser.parse_args(["-h", "host", "-c", "cmd"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --timeout=60 -c cmd", canonical)
예제 #16
0
 def test_pauseafter(self):
     args = self.parser.parse_args(["-h", "host", "--pauseafter", "2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --pauseafter=2", canonical)
예제 #17
0
 def test_multiple_deploys(self):
     args = self.parser.parse_args(
         ["-h", "host", "-d", "component", "component2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -d component component2",
                      canonical)
예제 #18
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_multiple_dash_ds(self):
     args = self.parser.parse_args(["-h", "host", "-d", "component", "-d", "component2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -d component component2", canonical)
예제 #19
0
 def test_simple_command(self):
     args = self.parser.parse_args(["-h", "host", "-c", "cmd"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -c cmd", canonical)
예제 #20
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_multi_restart(self):
     args = self.parser.parse_args(["-h", "host", "-r", "com1", "-r", "com2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -r com1 -r com2", canonical)
예제 #21
0
 def test_sleeptime(self):
     args = parse_args(self.config, ["-h", "host", "--sleeptime", "5"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --sleeptime=5 --timeout=60",
                      canonical)
예제 #22
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_command_with_args(self):
     args = self.parser.parse_args(["-h", "host", "-c", "cmd", "arg"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -c cmd arg", canonical)
예제 #23
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_multiple_commands(self):
     args = self.parser.parse_args(["-h", "host", "-c", "cmd1", "-c", "cmd2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 -c cmd1 -c cmd2", canonical)
예제 #24
0
파일: args.py 프로젝트: 13steinj/rollingpin
 def test_verbose(self):
     args = self.parser.parse_args(["-h", "host", "-v"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --verbose", canonical)
예제 #25
0
 def test_command_with_args(self):
     args = parse_args(self.config, ["-h", "host", "-c", "cmd", "arg"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --timeout=60 -c cmd arg",
                      canonical)
예제 #26
0
 def test_multiple_dash_hs(self):
     args = self.parser.parse_args(["-h", "host", "-h", "host2"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host host2 --parallel=5", canonical)
예제 #27
0
 def test_verbose(self):
     args = parse_args(self.config, ["-h", "host", "-v"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=5 --timeout=60 --verbose",
                      canonical)
예제 #28
0
파일: args.py 프로젝트: dellis23/rollingpin
 def test_parallel(self):
     args = self.parser.parse_args(["-h", "host", "--parallel", "1"])
     canonical = construct_canonical_commandline(self.config, args)
     self.assertEqual("-h host --parallel=1 --timeout=60", canonical)