def __init__(self): global ARGS, CONFIG, CONFIG_DIR parser = argparse.ArgumentParser( description=("osquery python integration testing.")) parser.add_argument("--config", metavar="FILE", default=None, help="Use special options from a config.") parser.add_argument("--verbose", default=False, action="store_true", help="Run daemons and extensions with --verbose") # Directory structure options parser.add_argument("--build", metavar="PATH", default=".", help="Path to osquery build (./build/<sys>/).") ARGS = parser.parse_args() if not os.path.exists(ARGS.build): print("Cannot find --build: %s" % ARGS.build) print("You must first run: make") exit(1) # Write config random.seed(time.time()) utils.reset_dir(CONFIG_DIR) CONFIG = read_config(ARGS.config) if ARGS.config else DEFAULT_CONFIG
def __init__(self): global ARGS, CONFIG, CONFIG_DIR parser = argparse.ArgumentParser(description=( "osquery python integration testing." )) parser.add_argument( "--config", metavar="FILE", default=None, help="Use special options from a config." ) parser.add_argument( "--verbose", default=False, action="store_true", help="Run daemons and extensions with --verbose" ) # Directory structure options parser.add_argument( "--build", metavar="PATH", default=".", help="Path to osquery build (./build/<sys>/)." ) ARGS = parser.parse_args() if not os.path.exists(ARGS.build): print("Cannot find --build: %s" % ARGS.build) print("You must first run: make") exit(1) # Write config random.seed(time.time()) utils.reset_dir(CONFIG_DIR) CONFIG = read_config(ARGS.config) if ARGS.config else DEFAULT_CONFIG
def getTestDirectory(base): path = os.path.join(base, "test-dir" + str(random.randint(1000, 9999))) utils.reset_dir(path) return path
def setUp(self): utils.reset_dir(CONFIG_DIR)
def setUp(self): self.generators = [] utils.reset_dir(TEMP_DIR)
def setUp(self): utils.reset_dir(TEMP_DIR)