A session-scope fixture that checks availability via a HEAD request, and skips after a timeout or error. This helps implementing tests using this resource, and gracefully degrade, if not available (offline, service disruption, etc). This online resource complements the local test HTTP server, which only supports the "dumb" HTTP transport for Git and, for example, no shallow cloning.
47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
"""Fixture setup"""
|
|
|
|
__all__ = [
|
|
'annexrepo',
|
|
'bareannexrepo',
|
|
'baregitrepo',
|
|
'cfgman',
|
|
'datalad_testresources',
|
|
'gitrepo',
|
|
'http_fileserver',
|
|
'modified_dataset',
|
|
'progress_handler',
|
|
'skip_when_symlinks_not_supported',
|
|
'symlinks_supported',
|
|
'test_datasets',
|
|
'verify_pristine_gitconfig_global',
|
|
]
|
|
|
|
|
|
from datalad_core.tests.fixtures import (
|
|
# function-scope temporary Git repo with an initialized annex
|
|
annexrepo,
|
|
# function-scope temporary, bare Git repo with an initialized annex
|
|
bareannexrepo,
|
|
# function-scope temporary, bare Git repo
|
|
baregitrepo,
|
|
# function-scope config manager
|
|
cfgman,
|
|
# session-scope, check for service availability
|
|
datalad_testresources,
|
|
# function-scope temporary Git repo
|
|
gitrepo,
|
|
# function-scope file server
|
|
http_fileserver,
|
|
# session-scope repository with complex unsafed modifications
|
|
modified_dataset,
|
|
# function-scope AuditProgressHandler
|
|
progress_handler,
|
|
# function-scope auto-skip when `symlinks_supported` is False
|
|
skip_when_symlinks_not_supported,
|
|
# session-scope flag if symlinks are supported in test directories
|
|
symlinks_supported,
|
|
# session-scope dataset collection, URL and path
|
|
test_datasets,
|
|
# verify no test leave contaminated config behind
|
|
verify_pristine_gitconfig_global,
|
|
)
|