Exemplo n.º 1
0
 def test_sperf_will_break_if_incorrect_comamnd_is_used(self):
     """this is here so we can rely on the parser tests
     for subcommands tests being accurate"""
     parser = sperf.build_parser()
     success = False
     try:
         parser.parse_args(["nevergonnabereal"])
     except SystemExit as e:
         success = True
         self.assertEqual(str(e), "2")
     self.assertTrue(success)
Exemplo n.º 2
0
 def test_sysbottle_wired(self):
     """verify sysbottle is connected"""
     parser = sperf.build_parser()
     args = parser.parse_args(["sysbottle", "iostat.txt"])
     self.assertTrue(hasattr(args, "func"))
Exemplo n.º 3
0
 def test_solrqueryagg_wired(self):
     """verify solrqueryagg is connected"""
     parser = sperf.build_parser()
     args = parser.parse_args(["search", "queryscore"])
     self.assertTrue(hasattr(args, "func"))
Exemplo n.º 4
0
 def test_slowquery_wired(self):
     """verify slowquery is connected"""
     parser = sperf.build_parser()
     args = parser.parse_args(["core", "slowquery"])
     self.assertTrue(hasattr(args, "func"))
Exemplo n.º 5
0
 def test_jarcheck_wired(self):
     """verify jarcheck is connected"""
     parser = sperf.build_parser()
     args = parser.parse_args(["core", "jarcheck"])
     self.assertTrue(hasattr(args, "func"))
Exemplo n.º 6
0
 def test_search_filtercache_wired(self):
     """verify filtercache is connected"""
     parser = sperf.build_parser()
     args = parser.parse_args(["search", "filtercache"])
     self.assertTrue(hasattr(args, "func"))
Exemplo n.º 7
0
 def test_core_diag_wired(self):
     """verify cassread is connected"""
     parser = sperf.build_parser()
     args = parser.parse_args(["core", "diag"])
     self.assertTrue(hasattr(args, "func"))
Exemplo n.º 8
0
 def test_sperf_global_short_flags(self):
     """tests the global short flag"""
     parser = sperf.build_parser()
     args = parser.parse_args(["-v", "-x"])
     self.assertTrue(hasattr(args, "debug"))
     self.assertTrue(hasattr(args, "noprogress"))
Exemplo n.º 9
0
 def test_sperf_global_flags(self):
     """testing global flags are wired up"""
     parser = sperf.build_parser()
     args = parser.parse_args(["--debug", "--no-progress"])
     self.assertTrue(hasattr(args, "debug"))
     self.assertTrue(hasattr(args, "noprogress"))
Exemplo n.º 10
0
def test_schema_wired():
    """verify schema is connected"""
    parser = sperf.build_parser()
    args = parser.parse_args(["core", "schema"])
    assert hasattr(args, "func")
Exemplo n.º 11
0
def test_sperf_global_short_flags():
    """tests the global short flag"""
    parser = sperf.build_parser()
    args = parser.parse_args(["-v", "-p"])
    assert hasattr(args, "debug")
    assert hasattr(args, "progress")
Exemplo n.º 12
0
def test_sperf_global_flags():
    """testing global flags are wired up"""
    parser = sperf.build_parser()
    args = parser.parse_args(["--debug", "--progress"])
    assert hasattr(args, "debug")
    assert hasattr(args, "progress")