mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
manager: fix index path to index.cdxj
This commit is contained in:
parent
ea460bb0f0
commit
c5b5c8ee4b
@ -20,6 +20,8 @@ from mock import patch
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
ARCHIVE_DIR = 'archive'
|
ARCHIVE_DIR = 'archive'
|
||||||
INDEX_DIR = 'indexes'
|
INDEX_DIR = 'indexes'
|
||||||
|
INDEX_FILE = 'index.cdxj'
|
||||||
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
root_dir = None
|
root_dir = None
|
||||||
@ -145,7 +147,7 @@ class TestManagedColls(object):
|
|||||||
os.path.join(nested_b, 'example.warc.gz')
|
os.path.join(nested_b, 'example.warc.gz')
|
||||||
])
|
])
|
||||||
|
|
||||||
nested_cdx = os.path.join(self.root_dir, 'collections', 'nested', INDEX_DIR, 'index.cdx')
|
nested_cdx = os.path.join(self.root_dir, 'collections', 'nested', INDEX_DIR, INDEX_FILE)
|
||||||
with open(nested_cdx) as fh:
|
with open(nested_cdx) as fh:
|
||||||
nested_cdx_index = fh.read()
|
nested_cdx_index = fh.read()
|
||||||
|
|
||||||
@ -170,7 +172,7 @@ class TestManagedColls(object):
|
|||||||
"""
|
"""
|
||||||
# ensure merged index is same as full reindex
|
# ensure merged index is same as full reindex
|
||||||
coll_dir = os.path.join(self.root_dir, 'collections', 'test', INDEX_DIR)
|
coll_dir = os.path.join(self.root_dir, 'collections', 'test', INDEX_DIR)
|
||||||
orig = os.path.join(coll_dir, 'index.cdx')
|
orig = os.path.join(coll_dir, INDEX_FILE)
|
||||||
bak = os.path.join(coll_dir, 'index.bak')
|
bak = os.path.join(coll_dir, 'index.bak')
|
||||||
|
|
||||||
shutil.copy(orig, bak)
|
shutil.copy(orig, bak)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user