def setUp(self): self.base_dir = os.path.join(comtst.abs_test_dir, b"backuprestore") self.from1_struct = { "from1": { "subs": { "fileA": { "content": "initial" }, "fileB": {} } } } self.from1_path = os.path.join(self.base_dir, b"from1") self.from2_struct = { "from2": { "subs": { "fileA": { "content": "modified" }, "fileC": {} } } } self.from2_path = os.path.join(self.base_dir, b"from2") fileset.create_fileset(self.base_dir, self.from1_struct) fileset.create_fileset(self.base_dir, self.from2_struct) fileset.remove_fileset(self.base_dir, {"bak": {}}) fileset.remove_fileset(self.base_dir, {"to1": {}}) fileset.remove_fileset(self.base_dir, {"to2": {}}) self.bak_path = os.path.join(self.base_dir, b"bak") self.to1_path = os.path.join(self.base_dir, b"to1") self.to2_path = os.path.join(self.base_dir, b"to2") self.success = False
def setUp(self): self.base_dir = os.path.join(comtst.abs_test_dir, b"action_list") self.from1_struct = { "from1": {"subs": { "fileChanged": {"content": "initial"}, "fileOld": {}, "fileUnchanged": {"content": "unchanged"}, }} } self.from1_path = os.path.join(self.base_dir, b"from1") self.from2_struct = { "from2": {"subs": { "fileChanged": {"content": "modified"}, "fileNew": {}, "fileUnchanged": {"content": "unchanged"}, }} } self.from2_path = os.path.join(self.base_dir, b"from2") fileset.create_fileset(self.base_dir, self.from1_struct) fileset.create_fileset(self.base_dir, self.from2_struct) fileset.remove_fileset(self.base_dir, {"bak": {"type": "dir"}}) self.bak_path = os.path.join(self.base_dir, b"bak") self.success = False # we backup twice to the same backup repository at different times comtst.rdiff_backup_action( True, True, self.from1_path, self.bak_path, ("--api-version", "201", "--current-time", "10000"), b"backup", ()) comtst.rdiff_backup_action( True, True, self.from2_path, self.bak_path, ("--api-version", "201", "--current-time", "20000"), b"backup", ())
def setUp(self): self.base_dir = os.path.join(comtst.abs_test_dir, b"location_map_hardlinks") self.from1_struct = { "from1": { "subs": { "hardlink1": { "content": "initial" }, "hardlink2": { "link": "hardlink1" }, "hardlink3": { "link": "hardlink1" }, } } } self.from1_path = os.path.join(self.base_dir, b"from1") fileset.create_fileset(self.base_dir, self.from1_struct) fileset.remove_fileset(self.base_dir, {"bak": {"type": "dir"}}) fileset.remove_fileset(self.base_dir, {"to1": {"type": "dir"}}) self.bak_path = os.path.join(self.base_dir, b"bak") self.to1_path = os.path.join(self.base_dir, b"to1") self.success = False
def setUp(self): self.base_dir = os.path.join(comtst.abs_test_dir, b"action_backuprestore") self.from1_struct = { "from1": {"subs": { "fileA": {"content": "initial"}, "fileB": {}, "dirOld": {"type": "dir"}, "itemX": {"type": "dir"}, "itemY": {"type": "file"}, "longdirnam" * 25: {"type": "dir"}, "longfilnam" * 25: {"content": "not so long content"}, "somehardlink": {"link": "fileA"}, }} } self.from1_path = os.path.join(self.base_dir, b"from1") self.from2_struct = { "from2": {"subs": { "fileA": {"content": "modified"}, "fileC": {}, "dirNew": {"type": "dir"}, "itemX": {"type": "file"}, "itemY": {"type": "dir"}, "longdirnam" * 25: {"type": "dir"}, "longfilnam" * 25: {"content": "differently long"}, "somehardlink": {"link": "fileA"}, }} } self.from2_path = os.path.join(self.base_dir, b"from2") fileset.create_fileset(self.base_dir, self.from1_struct) fileset.create_fileset(self.base_dir, self.from2_struct) fileset.remove_fileset(self.base_dir, {"bak": {}}) fileset.remove_fileset(self.base_dir, {"to1": {}}) fileset.remove_fileset(self.base_dir, {"to2": {}}) self.bak_path = os.path.join(self.base_dir, b"bak") self.to1_path = os.path.join(self.base_dir, b"to1") self.to2_path = os.path.join(self.base_dir, b"to2") self.success = False
def setUp(self): self.base_dir = os.path.join(comtst.abs_test_dir, b"location_map_filenames") self.from1_struct = { "from1": { "subs": { "fileABC": { "content": "initial" }, "fileXYZ": {}, "dirAbCXyZ": { "type": "dir" }, "itemX": { "type": "dir" }, "itemY": { "type": "file" }, "longDiRnAm" * 25: { "type": "dir" }, "longFiLnAm" * 25: { "content": "not so long content" }, } } } self.from1_path = os.path.join(self.base_dir, b"from1") self.from2_struct = { "from2": { "subs": { "fileABC": { "content": "modified" }, "fileXYZ": {}, "diraBcXyZ": { "type": "dir" }, "itemX": { "type": "file" }, "itemY": { "type": "dir" }, "longDiRnAm" * 25: { "type": "dir" }, "longFiLnAm" * 25: { "content": "differently long" }, } } } self.from2_path = os.path.join(self.base_dir, b"from2") fileset.create_fileset(self.base_dir, self.from1_struct) fileset.create_fileset(self.base_dir, self.from2_struct) fileset.remove_fileset(self.base_dir, {"bak": {"type": "dir"}}) fileset.remove_fileset(self.base_dir, {"to1": {"type": "dir"}}) fileset.remove_fileset(self.base_dir, {"to2": {"type": "dir"}}) self.bak_path = os.path.join(self.base_dir, b"bak") self.to1_path = os.path.join(self.base_dir, b"to1") self.to2_path = os.path.join(self.base_dir, b"to2") self.success = False