Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration: remove unused pytest.mark.ignore_blocked. #171

Conversation

aznashwan
Copy link

Applicable spec:

Overview

Remove unused pytest.mark.ignore_blocked from Ceph integration test.

Rationale

The mark seems to not be used or referenced anywhere within this repo or the canonical/operator-workflows repo use to run the tests.

Pytest warns of this in every workflow run.

Juju Events Changes

None.

Module Changes

None.

Library Changes

None.

Checklist

@aznashwan aznashwan requested a review from a team as a code owner November 19, 2024 10:37
@addyess
Copy link
Contributor

addyess commented Nov 20, 2024

@aznashwan would you run tox -e format,lint and see if you can patch up the linter failures

Copy link
Contributor

Lint checks failed for 927f7f0

```

--- /home/runner/work/k8s-operator/k8s-operator/tests/integration/test_ceph.py 2024-11-20 20:48:02.423151+00:00
+++ /home/runner/work/k8s-operator/k8s-operator/tests/integration/test_ceph.py 2024-11-20 20:48:38.620897+00:00
@@ -9,13 +9,11 @@
import pytest
from juju import model, unit

This pytest mark configures the test environment to use the Canonical Kubernetes

bundle with ceph, for all the test within this module.

-pytestmark = [

  • pytest.mark.bundle_file("test-bundle-ceph.yaml")
    -]
    +pytestmark = [pytest.mark.bundle_file("test-bundle-ceph.yaml")]

@pytest.mark.abort_on_fail
async def test_ceph_sc(kubernetes_cluster: model.Model):
"""Test that a ceph storage class is available."""

Copy link
Contributor

Test coverage for 927f7f0

coverage-report: install_deps /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> python -I -m pip install 'coverage[toml]'
coverage-report: commands[0] /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> coverage report
Name                                    Stmts   Miss  Cover
-----------------------------------------------------------
lib/charms/k8s/v0/k8sd_api_manager.py     270     29    89%
src/charm.py                              479    255    47%
src/cloud_integration.py                   80      3    96%
src/containerd.py                         140     16    89%
src/cos_integration.py                     33     12    64%
src/inspector.py                           40      3    92%
src/kube_control.py                        39     31    21%
src/literals.py                             1      0   100%
src/protocols.py                           12      2    83%
src/reschedule.py                          77      4    95%
src/snap.py                                79      3    96%
src/token_distributor.py                  174    103    41%
src/upgrade.py                             31      1    97%
-----------------------------------------------------------
TOTAL                                    1455    462    68%
coverage-report: OK (1.21=setup[1.02]+cmd[0.19] seconds)
congratulations :) (1.26 seconds)

Static code analysis report

Run started:2024-11-20 20:48:53.793530

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 3169
  Total lines skipped (#nosec): 13
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@addyess addyess closed this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants