Fix end-to-end tests.
This commit is contained in:
parent
52f9442377
commit
87bfd6e97f
6 changed files with 8 additions and 5 deletions
|
|
@ -116,7 +116,7 @@ def convert_value_type(value, option_type):
|
|||
raise ValueError(f'Argument value "{value}" is invalid: {error.problem}')
|
||||
|
||||
if not isinstance(parsed_value, borgmatic.config.schema.parse_type(option_type)):
|
||||
raise ValueError(f'Argument value "{value}" is not of the expected type: {option_type}') # noqa: TRY004
|
||||
raise ValueError(f'Argument value "{value}" is not of the expected type: {option_type}')
|
||||
|
||||
return parsed_value
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ def raise_retain_node_error(loader, node):
|
|||
Also raise ValueError if a scalar node is given, as "!retain" is not supported on scalar nodes.
|
||||
'''
|
||||
if isinstance(node, (ruamel.yaml.nodes.MappingNode, ruamel.yaml.nodes.SequenceNode)):
|
||||
raise ValueError( # noqa: TRY004
|
||||
raise ValueError(
|
||||
'The !retain tag may only be used within a configuration file containing a merged !include tag.',
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespaces = false
|
|||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = "tests"
|
||||
addopts = "--cov-report term-missing:skip-covered --cov=borgmatic --no-cov-on-fail --cov-fail-under=100 --ignore=tests/end-to-end"
|
||||
addopts = "--cov-report term-missing:skip-covered --cov=borgmatic --no-cov-on-fail --cov-fail-under=100 --ignore=tests/end-to-end --timeout=60"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
|
|
@ -100,6 +100,7 @@ ignore = [
|
|||
"S404", # subprocess import
|
||||
"SIM115", # open() without context manager
|
||||
"SIM905", # split() on literal string
|
||||
"TRY004", # type check and raise something other than TypeError
|
||||
]
|
||||
|
||||
[tool.ruff.lint.flake8-quotes]
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ pluggy==1.6.0
|
|||
pygments==2.20.0
|
||||
pytest==9.0.2
|
||||
pytest-cov==7.1.0
|
||||
pytest-timeout==2.4.0
|
||||
pyyaml>5.0.0
|
||||
referencing==0.37.0
|
||||
requests==2.33.1
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ services:
|
|||
MONGO_INITDB_ROOT_PASSWORD: test2
|
||||
command: docker-entrypoint.sh --port=27018
|
||||
tests:
|
||||
image: docker.io/alpine:3.22
|
||||
image: docker.io/alpine:3.23
|
||||
environment:
|
||||
TEST_CONTAINER: true
|
||||
volumes:
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ class Background_web_server:
|
|||
self.thread.join()
|
||||
|
||||
|
||||
FINISH = 1
|
||||
START_AND_FINISH = 2
|
||||
START_LOG_AND_FINISH = 3
|
||||
|
||||
|
|
@ -94,7 +95,7 @@ START_LOG_AND_FINISH = 3
|
|||
),
|
||||
(
|
||||
'loki:\n url: http://localhost:12345/loki/api/v1/push\n labels:\n app: borgmatic\n send_logs: true',
|
||||
START_AND_FINISH,
|
||||
FINISH,
|
||||
),
|
||||
(
|
||||
'loki:\n url: http://localhost:12345/loki/api/v1/push\n labels:\n app: borgmatic',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue