Skip to content

Commit

Permalink
Mock spacewak gpg home directory
Browse files Browse the repository at this point in the history
Mocked the SPACEWALK_GPG_HOMEDIR value to `~/gnupg/`, which is the
default directory for gpg, in order to execute the gpg tests outside
the uyuni-server
  • Loading branch information
waterflow80 committed Oct 24, 2024
1 parent c2fee2e commit c5bd19f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/lzreposync/tests/test_lzreposync.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import shutil
import time
import unittest
from unittest.mock import patch

import pytest
from psycopg2 import errors
Expand Down Expand Up @@ -1093,6 +1094,7 @@ def test_get_repositories_by_channel_label(self):
self.assertEqual(repo_url, repo.source_url)
self.assertEqual("N", repo.metadata_singed)

@patch('lzreposync.rpm_repo.SPACEWALK_GPG_HOMEDIR', '~/.gnupg/')
def test_has_valid_gpg_signature(self):
"""
NOTE!: to successfully run this test, you should have already added
Expand Down

0 comments on commit c5bd19f

Please sign in to comment.