From 1682e96d551d66f6436f3111bef0f57e9e473d46 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Sun, 6 Oct 2024 22:30:15 +0200 Subject: [PATCH] Test pinning --- .codecov.yml | 25 +++++++++++++++++++ .copier-answers.yml | 2 +- .github/workflows/ci.yml | 8 +++--- .github/workflows/deploy-docs-action.yml | 13 +++++----- .github/workflows/deploy-package-action.yml | 9 ++++--- .github/workflows/docs-action.yml | 10 ++++---- .github/workflows/get-changed-files.yml | 7 +++--- .github/workflows/package-action.yml | 11 +++++---- .github/workflows/pre-commit-action.yml | 8 +++--- .github/workflows/tag.yml | 4 +-- .github/workflows/test-action.yml | 14 +++++------ .pre-commit-config.yaml | 27 +++++++++++---------- noxfile.py | 2 +- tests/conftest.py | 12 ++++----- tests/functional/conftest.py | 26 ++++++++++---------- tests/integration/conftest.py | 10 ++++---- tests/unit/conftest.py | 6 ++--- 17 files changed, 112 insertions(+), 82 deletions(-) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..f9f2e82 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,25 @@ +--- +coverage: + status: + project: + default: false + app: + informational: true + paths: + - src/ + tests: + informational: true + paths: + - tests/ + patch: + default: false + app: + informational: true + paths: + - src/ + tests: + informational: true + paths: + - tests/ +github_checks: + annotations: false diff --git a/.copier-answers.yml b/.copier-answers.yml index a3c28b0..85d625f 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # Autogenerated. Do not edit this by hand, use `copier update`. --- -_commit: 0.4.7 +_commit: 0.4.8-3-ge7c124f _src_path: https://github.com/salt-extensions/salt-extension-copier author: jeanluc author_email: lkubb@protonmail.com diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d6ad44..fc55c61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: changed-files-debug: name: Changed Files Debug Output - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: always() needs: - get-changed-files @@ -107,7 +107,7 @@ jobs: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the CI Pipeline Exit Status - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: always() needs: - test @@ -119,7 +119,7 @@ jobs: steps: - name: Download Exit Status Files if: always() - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: path: exitstatus pattern: exitstatus-* @@ -127,7 +127,7 @@ jobs: - name: Delete Exit Status Artifacts if: always() - uses: geekyeggo/delete-artifact@v5 + uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0 with: name: exitstatus-* useGlob: true diff --git a/.github/workflows/deploy-docs-action.yml b/.github/workflows/deploy-docs-action.yml index a7b85c7..df278ab 100644 --- a/.github/workflows/deploy-docs-action.yml +++ b/.github/workflows/deploy-docs-action.yml @@ -35,29 +35,30 @@ jobs: pages: write id-token: write - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + steps: - name: Download built docs - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: ${{ inputs.artifact-name }} path: html-docs - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 with: name: html-docs-pages path: html-docs - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 with: artifact_name: html-docs-pages - name: Delete GitHub Pages artifact if: always() - uses: geekyeggo/delete-artifact@v5 + uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0 with: name: html-docs-pages failOnError: false @@ -70,7 +71,7 @@ jobs: - name: Upload Exit Status if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: exitstatus-${{ github.job }} path: exitstatus diff --git a/.github/workflows/deploy-package-action.yml b/.github/workflows/deploy-package-action.yml index fee16e4..b72e123 100644 --- a/.github/workflows/deploy-package-action.yml +++ b/.github/workflows/deploy-package-action.yml @@ -20,16 +20,17 @@ on: jobs: build: name: Publish Python Package to ${{ fromJSON('["PyPI", "Test PyPI"]')[inputs.test] }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + steps: - name: Download Python Package Artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: salt-extension-${{ inputs.version }}-packages path: dist - name: Publish distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@c44d2f0e52f028349e3ecafbf7f32561da677277 # v1.10.3 if: ${{ inputs.test }} with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} @@ -47,7 +48,7 @@ jobs: dist/* - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@c44d2f0e52f028349e3ecafbf7f32561da677277 # v1.10.3 if: ${{ !inputs.test }} with: password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/docs-action.yml b/.github/workflows/docs-action.yml index e5e713d..4b83a61 100644 --- a/.github/workflows/docs-action.yml +++ b/.github/workflows/docs-action.yml @@ -6,16 +6,16 @@ on: jobs: Docs: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: fetch-depth: 0 - name: Set up Python 3.10 For Nox - uses: actions/setup-python@v5 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: "3.10" @@ -35,7 +35,7 @@ jobs: nox --force-color -e docs - name: Upload built docs as artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: html-docs path: docs/_build/html @@ -48,7 +48,7 @@ jobs: - name: Upload Exit Status if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: exitstatus-${{ github.job }} path: exitstatus diff --git a/.github/workflows/get-changed-files.yml b/.github/workflows/get-changed-files.yml index 49276a5..1188039 100644 --- a/.github/workflows/get-changed-files.yml +++ b/.github/workflows/get-changed-files.yml @@ -9,18 +9,19 @@ on: jobs: get-changed-files: name: Get Changed Files - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: read # for dorny/paths-filter to fetch a list of changed files pull-requests: read # for dorny/paths-filter to read pull requests outputs: changed-files: ${{ toJSON(steps.changed-files.outputs) }} + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Get Changed Files id: changed-files - uses: dorny/paths-filter@v3 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 with: token: ${{ github.token }} list-files: escape diff --git a/.github/workflows/package-action.yml b/.github/workflows/package-action.yml index 46b76ae..880349f 100644 --- a/.github/workflows/package-action.yml +++ b/.github/workflows/package-action.yml @@ -11,14 +11,15 @@ on: jobs: build: name: Build Python Packages (wheel and sdist) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: fetch-depth: 0 - name: Set up Python 3.10 - uses: actions/setup-python@v5 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: "3.10" @@ -37,7 +38,7 @@ jobs: run: python -m build --outdir dist/ - name: Upload build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 if: always() with: name: salt-extension-${{ inputs.version }}-packages @@ -52,7 +53,7 @@ jobs: - name: Upload Exit Status if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: exitstatus-${{ github.job }} path: exitstatus diff --git a/.github/workflows/pre-commit-action.yml b/.github/workflows/pre-commit-action.yml index 04839c2..5df6886 100644 --- a/.github/workflows/pre-commit-action.yml +++ b/.github/workflows/pre-commit-action.yml @@ -12,9 +12,9 @@ on: jobs: Pre-Commit: name: Pre-Commit - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: - image: python:3.10.14-slim-bookworm + image: docker.io/library/python:3.10.14-slim-bookworm@sha256:2407c61b1a18067393fecd8a22cf6fceede893b6aaca817bf9fbfe65e33614a3 steps: - name: Install System Deps @@ -23,7 +23,7 @@ jobs: apt-get install -y enchant-2 git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev git config --global --add safe.directory "$(pwd)" - - uses: actions/checkout@v4 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Install Pre-Commit run: | @@ -49,7 +49,7 @@ jobs: - name: Upload Exit Status if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: exitstatus-${{ github.job }} path: exitstatus diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 1217401..59f6209 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -8,12 +8,12 @@ on: jobs: get_tag_version: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: version: ${{ steps.get_version.outputs.version }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Extract tag name id: get_version diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 3d05333..f25184b 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -7,7 +7,7 @@ on: jobs: Linux: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 30 strategy: @@ -21,12 +21,12 @@ jobs: - {salt-version: "3007.1", python-version: "3.10"} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: fetch-depth: 2 # coverage: Issue detecting commit SHA - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: ${{ matrix.python-version }} @@ -55,7 +55,7 @@ jobs: echo "flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")" >> "$GITHUB_OUTPUT" - name: Upload Project Code Coverage - uses: codecov/codecov-action@v4.5.0 # https://github.com/codecov/codecov-action/issues/1594 + uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 with: file: artifacts/coverage-project.xml disable_search: true @@ -66,7 +66,7 @@ jobs: version: v0.7.5 - name: Upload Tests Code Coverage - uses: codecov/codecov-action@v4.5.0 + uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 with: file: artifacts/coverage-tests.xml disable_search: true @@ -78,7 +78,7 @@ jobs: - name: Upload Logs if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log path: artifacts/runtests-*.log @@ -91,7 +91,7 @@ jobs: - name: Upload Exit Status if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: exitstatus-${{ github.job }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }} path: exitstatus diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 053b5ec..63e7ce9 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ minimum_pre_commit_version: 2.4.0 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # v4.6.0 hooks: - id: check-merge-conflict # Check for files that contain merge conflict strings. args: [--assume-in-merge] @@ -15,7 +15,7 @@ repos: # ----- Formatting ----------------------------------------------------------------------------> - repo: https://github.com/saltstack/pre-commit-remove-import-headers - rev: 1.1.0 + rev: 209beff8e11fed83f3f0863ccfd95aa663fffaf6 # 1.1.0 hooks: - id: remove-import-headers @@ -37,7 +37,7 @@ repos: - repo: https://github.com/saltstack/salt-rewrite # Automatically rewrite code with known rules - rev: 2.5.2 + rev: 8079cfb7f601e5dbad58b8449d85bb24f1e52082 # 2.5.2 hooks: - id: salt-rewrite alias: rewrite-docstrings @@ -47,7 +47,7 @@ repos: - repo: https://github.com/saltstack/salt-rewrite # Automatically rewrite code with known rules - rev: 2.5.2 + rev: 8079cfb7f601e5dbad58b8449d85bb24f1e52082 # 2.5.2 hooks: - id: salt-rewrite alias: rewrite-tests @@ -56,17 +56,17 @@ repos: args: [--silent, -E, fix_docstrings] - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: 32151ac97cbfd7f9dcd22e49516fb32266db45b4 # v3.16.0 hooks: - id: pyupgrade name: Rewrite Code to be Py3.8+ args: [ - --py38-plus + --py38-plus, ] exclude: src/saltext/telegram/version.py - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: c235f5e450b4b84e58d114ed4c589cbf454175a3 # 5.13.2 hooks: - id: isort args: [ @@ -75,14 +75,14 @@ repos: exclude: src/saltext/telegram/(__init__|version).py - repo: https://github.com/psf/black - rev: 24.8.0 + rev: b965c2a5026f8ba399283ba3e01898b012853c79 # 24.8.0 hooks: - id: black args: [-l 100] exclude: src/saltext/telegram/version.py - repo: https://github.com/adamchainz/blacken-docs - rev: 1.18.0 + rev: 4c97c4a0d921007af6fefae92d8447cfbf63720b # 1.18.0 hooks: - id: blacken-docs args: [--skip-errors] @@ -93,15 +93,16 @@ repos: # ----- Security ------------------------------------------------------------------------------> - repo: https://github.com/PyCQA/bandit - rev: 1.7.9 + rev: 691f465b4bac758ea1d6dfa9b57d3881a12954fd # 1.7.9 hooks: - id: bandit alias: bandit-salt name: Run bandit against the code base args: [--silent, -lll, --skip, B701] exclude: src/saltext/telegram/version.py + - repo: https://github.com/PyCQA/bandit - rev: 1.7.9 + rev: 691f465b4bac758ea1d6dfa9b57d3881a12954fd # 1.7.9 hooks: - id: bandit alias: bandit-tests @@ -137,9 +138,9 @@ repos: - uv==0.4.0 # Makes this hook much faster - repo: https://github.com/Mateusz-Grzelinski/actionlint-py - rev: 1ca29a1b5d949b3586800190ad6cc98317cb43b8 # v1.7.1.15 + rev: c01fb5723b54075325cd9b5e5665a9ae84baf950 # v1.7.1.15 hooks: - id: actionlint additional_dependencies: - - shellcheck-py>=0.9.0.5 + - shellcheck-py==0.10.0.1 # <---- Code Analysis -------------------------------------------------------------------------- diff --git a/noxfile.py b/noxfile.py index fb4b599..d19faef 100755 --- a/noxfile.py +++ b/noxfile.py @@ -30,7 +30,7 @@ SKIP_REQUIREMENTS_INSTALL = os.environ.get("SKIP_REQUIREMENTS_INSTALL", "0") == "1" EXTRA_REQUIREMENTS_INSTALL = os.environ.get("EXTRA_REQUIREMENTS_INSTALL") -COVERAGE_REQUIREMENT = os.environ.get("COVERAGE_REQUIREMENT") or "coverage==7.5.1" +COVERAGE_REQUIREMENT = os.environ.get("COVERAGE_REQUIREMENT") or "coverage==7.6.1" SALT_REQUIREMENT = os.environ.get("SALT_REQUIREMENT") or "salt>=3006" if SALT_REQUIREMENT == "salt==master": SALT_REQUIREMENT = "git+https://github.com/saltstack/salt.git@master" diff --git a/tests/conftest.py b/tests/conftest.py index 9a42ad9..b60a2f3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,13 +12,13 @@ # This swallows all logging to stdout. # To show select logs, set --log-cli-level= -for handler in logging.root.handlers[:]: +for handler in logging.root.handlers[:]: # pragma: no cover logging.root.removeHandler(handler) handler.close() @pytest.fixture(scope="session") -def salt_factories_config(): +def salt_factories_config(): # pragma: no cover """ Return a dictionary with the keyword arguments for FactoriesManager """ @@ -30,7 +30,7 @@ def salt_factories_config(): @pytest.fixture(scope="package") -def master_config(): +def master_config(): # pragma: no cover """ Salt master configuration overrides for integration tests. """ @@ -38,12 +38,12 @@ def master_config(): @pytest.fixture(scope="package") -def master(salt_factories, master_config): +def master(salt_factories, master_config): # pragma: no cover return salt_factories.salt_master_daemon(random_string("master-"), overrides=master_config) @pytest.fixture(scope="package") -def minion_config(): +def minion_config(): # pragma: no cover """ Salt minion configuration overrides for integration tests. """ @@ -51,5 +51,5 @@ def minion_config(): @pytest.fixture(scope="package") -def minion(master, minion_config): +def minion(master, minion_config): # pragma: no cover return master.salt_minion_daemon(random_string("minion-"), overrides=minion_config) diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py index 2c7c84a..0a4757c 100644 --- a/tests/functional/conftest.py +++ b/tests/functional/conftest.py @@ -8,12 +8,12 @@ @pytest.fixture(scope="package") -def minion_id(): +def minion_id(): # pragma: no cover return "func-tests-minion-opts" @pytest.fixture(scope="module") -def state_tree(tmp_path_factory): +def state_tree(tmp_path_factory): # pragma: no cover state_tree_path = tmp_path_factory.mktemp("state-tree-base") try: yield state_tree_path @@ -22,7 +22,7 @@ def state_tree(tmp_path_factory): @pytest.fixture(scope="module") -def state_tree_prod(tmp_path_factory): +def state_tree_prod(tmp_path_factory): # pragma: no cover state_tree_path = tmp_path_factory.mktemp("state-tree-prod") try: yield state_tree_path @@ -31,7 +31,7 @@ def state_tree_prod(tmp_path_factory): @pytest.fixture(scope="module") -def minion_config_defaults(): +def minion_config_defaults(): # pragma: no cover """ Functional test modules can provide this fixture to tweak the default configuration dictionary passed to the minion factory @@ -40,7 +40,7 @@ def minion_config_defaults(): @pytest.fixture(scope="module") -def minion_config_overrides(): +def minion_config_overrides(): # pragma: no cover """ Functional test modules can provide this fixture to tweak the configuration overrides dictionary passed to the minion factory @@ -56,7 +56,7 @@ def minion_opts( state_tree_prod, minion_config_defaults, minion_config_overrides, -): +): # pragma: no cover minion_config_overrides.update( { "file_client": "local", @@ -79,7 +79,7 @@ def minion_opts( @pytest.fixture(scope="module") -def master_config_defaults(): +def master_config_defaults(): # pragma: no cover """ Functional test modules can provide this fixture to tweak the default configuration dictionary passed to the master factory @@ -88,7 +88,7 @@ def master_config_defaults(): @pytest.fixture(scope="module") -def master_config_overrides(): +def master_config_overrides(): # pragma: no cover """ Functional test modules can provide this fixture to tweak the configuration overrides dictionary passed to the master factory @@ -103,7 +103,7 @@ def master_opts( state_tree_prod, master_config_defaults, master_config_overrides, -): +): # pragma: no cover master_config_overrides.update( { "file_client": "local", @@ -126,12 +126,12 @@ def master_opts( @pytest.fixture(scope="module") -def loaders(minion_opts): +def loaders(minion_opts): # pragma: no cover return Loaders(minion_opts, loaded_base_name=f"{__name__}.loaded") @pytest.fixture(autouse=True) -def reset_loaders_state(loaders): +def reset_loaders_state(loaders): # pragma: no cover try: # Run the tests yield @@ -141,10 +141,10 @@ def reset_loaders_state(loaders): @pytest.fixture(scope="module") -def modules(loaders): +def modules(loaders): # pragma: no cover return loaders.modules @pytest.fixture(scope="module") -def states(loaders): +def states(loaders): # pragma: no cover return loaders.states diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 9bd9458..b9c5954 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -2,27 +2,27 @@ @pytest.fixture(scope="package") -def master(master): +def master(master): # pragma: no cover with master.started(): yield master @pytest.fixture(scope="package") -def minion(minion): +def minion(minion): # pragma: no cover with minion.started(): yield minion @pytest.fixture -def salt_run_cli(master): +def salt_run_cli(master): # pragma: no cover return master.salt_run_cli() @pytest.fixture -def salt_cli(master): +def salt_cli(master): # pragma: no cover return master.salt_cli() @pytest.fixture -def salt_call_cli(minion): +def salt_call_cli(minion): # pragma: no cover return minion.salt_call_cli() diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index b3b6ced..4e1e4b2 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -5,7 +5,7 @@ @pytest.fixture -def minion_opts(tmp_path): +def minion_opts(tmp_path): # pragma: no cover """ Default minion configuration with relative temporary paths to not require root permissions. @@ -24,7 +24,7 @@ def minion_opts(tmp_path): @pytest.fixture -def master_opts(tmp_path): +def master_opts(tmp_path): # pragma: no cover """ Default master configuration with relative temporary paths to not require root permissions. @@ -43,7 +43,7 @@ def master_opts(tmp_path): @pytest.fixture -def syndic_opts(tmp_path): +def syndic_opts(tmp_path): # pragma: no cover """ Default master configuration with relative temporary paths to not require root permissions.