def test_multiple_folders(self): """Tests multiple folders creation.""" utils.create_folders(self.tmp_dir, ["foo", "bar"]) assert os.path.exists(os.path.join(self.tmp_dir, "foo")) assert os.path.exists(os.path.join(self.tmp_dir, "bar")) os.rmdir(os.path.join(self.tmp_dir, "foo")) os.rmdir(os.path.join(self.tmp_dir, "bar"))
def create_structure(): """Creates Cuckoo directories.""" folders = ["log", "storage", os.path.join("storage", "analyses"), os.path.join("storage", "binaries")] try: create_folders(root=CUCKOO_ROOT, folders=folders) except CuckooOperationalError as e: raise CuckooStartupError(e)
def create_structure(): """Creates Cuckoo directories.""" folders = ["db", "log", "storage", "storage/analyses", "storage/binaries"] try: create_folders(root=CUCKOO_ROOT, folders=folders) except CuckooOperationalError as e: raise CuckooStartupError(e)
def create_structure(): """Creates Cuckoo directories.""" folders = ["db", "log", "storage", "storage/analyses", "storage/binaries"] create_folders(root=CUCKOO_ROOT,folders=folders)
def create_structure(): """Creates Cuckoo directories.""" folders = [ "log", "storage", os.path.join("storage", "analyses"), os.path.join("storage", "binaries"), os.path.join("data", "feeds"), ] try: create_folders(root=CUCKOO_ROOT, folders=folders) except CuckooOperationalError as e: raise CuckooStartupError(e)
def create_structure(): """Creates Cuckoo directories.""" folders = [ "log", "storage", os.path.join("storage", "analyses"), os.path.join("storage", "binaries"), os.path.join("data", "feeds"), os.path.join("data", "guacrecordings"), ] try: create_folders(root=CUCKOO_ROOT, folders=folders) except CuckooOperationalError as e: raise CuckooStartupError( f"Can't create folders. Ensure that you executed CAPE with proper USER! Maybe should be cape user?. %s", str(e))
def test_single_folder(self): """Tests a single folder creation.""" utils.create_folders(self.tmp_dir, ["foo"]) assert os.path.exists(os.path.join(self.tmp_dir, "foo")) os.rmdir(os.path.join(self.tmp_dir, "foo"))
def test_create_folders_no_folders(self): utils.create_folders(root="foo")