]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/smb: make the smb_cfg fixture module scoped
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 9 Jan 2026 14:32:56 +0000 (09:32 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 29 Jan 2026 17:07:04 +0000 (12:07 -0500)
This means the file will only be read when pytest changes modules.
This also allows this fixture to be used with other fixtures at the
module or scope "higher" than the function scope.

See: https://docs.pytest.org/en/stable/how-to/fixtures.html#fixture-scopes

Signed-off-by: John Mulligan <jmulligan@redhat.com>
qa/workunits/smb/tests/conftest.py

index dcc8f9e99c7e61b3ff77f94f78b2884cb00001a6..6863645cece6eabb9ac71737caccb046f159febd 100644 (file)
@@ -16,7 +16,7 @@ def read_smb_test_meta(conf_file=None):
     return SMBTestConf(json_data)
 
 
-@pytest.fixture
+@pytest.fixture(scope='module')
 def smb_cfg():
     conf = read_smb_test_meta()
     if not conf: