Skip to content

Commit

Permalink
Repair coverage to be compatible with 8.3 test env
Browse files Browse the repository at this point in the history
Impacted drivers: LINSTOR, MooseFS and ZFS.
- Ignore all linstor.* members during coverage,
  the module is not installed in github runner.
- Use mock from unittest, the old one is not found now.
- Remove useless return from LinstorSR scan method.

Signed-off-by: Ronan Abhamon <[email protected]>
  • Loading branch information
Wescoeur committed Apr 10, 2024
1 parent 97b2681 commit a151cef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions drivers/LinstorSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,8 @@ def scan(self, uuid):

# Update the database before the restart of the GC to avoid
# bad sync in the process if new VDIs have been introduced.
ret = super(LinstorSR, self).scan(self.uuid)
super(LinstorSR, self).scan(self.uuid)
self._kick_gc()
return ret

@_locked_load
def vdi(self, uuid):
Expand Down
2 changes: 1 addition & 1 deletion tests/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ignored-classes=SQLObject

# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed.
generated-members=REQUEST,acl_users,aq_parent
generated-members=REQUEST,acl_users,aq_parent,linstor.*

# List of module names for which member attributes should not be checked
# # (useful for modules/projects where namespaces are manipulated during runtime
Expand Down
4 changes: 3 additions & 1 deletion tests/test_MooseFSSR.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import mock
from unittest import mock
import unittest

import MooseFSSR
import unittest

Expand Down
5 changes: 3 additions & 2 deletions tests/test_ZFSSR.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from unittest import mock
import unittest

import FileSR
import mock
import os
import SR
import unittest
import ZFSSR


Expand Down

0 comments on commit a151cef

Please sign in to comment.