Skip to content
Commits on Source (2)
  • nimrod's avatar
    Spelling. · 74f9c7ce
    nimrod authored
    - Add the code-spell pre-commit hook.
    - Correct the spelling errors it found.
    74f9c7ce
  • nimrod's avatar
    Fetch submodules for BATS CLI tests. · 9c1c7221
    nimrod authored
    It's set in the CI template, so I don't know why it was ignored. Anyway,
    set it here and get it working again.
    9c1c7221
......@@ -49,6 +49,8 @@ pytest:
bats:
image: docker.io/library/debian:bullseye-slim
variables:
GIT_SUBMODULE_STRATEGY: recursive
stage: test
tags: [host01.shore.co.il]
before_script:
......
......@@ -13,6 +13,11 @@ repos:
hooks:
- id: detect-secrets
- repo: https://github.com/codespell-project/codespell.git
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.1
hooks:
......
......@@ -10,7 +10,7 @@ It is intended for my personal use as the warning and critical alerts go to `my
notification mechanism <https://git.shore.co.il/nimrod/nextcloud-notifier>`_.
There is a small-ish binary that is created in the CI pipeline that doesn't have
any external dependencies (like the Python VM or any 3rd party Python packages).
The latest binary is avaiable at
The latest binary is available at
https://git.shore.co.il/shore/mnpw/-/jobs/artifacts/master/raw/dist/mnpw?job=build-executable
and should work all Linux distro with glibc 2.17 or newer.
......@@ -73,7 +73,7 @@ To run all of the tests locally:
All of those tests (and more) run in the `CI pipeline
<https://git.shore.co.il/shore/mnpw/-/pipelines>`_ on each push.
To release a new verion:
To release a new version:
.. code:: shell
......
......@@ -47,14 +47,14 @@ PERF_DATA = [
],
)
def test_check_exec(command, args, exit_code):
"""Test the executation of checks."""
"""Test the execution of checks."""
check = nagios.Check(command, args)
check.run()
assert check.ExitCode == exit_code
def test_check_command_not_found():
"""Test check with a nonexistant command."""
"""Test check with a nonexistent command."""
check = nagios.Check("/abcdef", [])
with pytest.raises(RuntimeError):
check.run()
......