Skip to content

Commit

Permalink
rpmbuild: cleanup el6 code
Browse files Browse the repository at this point in the history
introduced in commit 7dfb269
  • Loading branch information
xsuchy committed Sep 2, 2024
1 parent cfd0e8f commit 1c61875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 0 additions & 2 deletions rpmbuild/copr-rpmbuild.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ Source0: %name-%version.tar.gz
BuildRequires: %{python}-copr-common >= %copr_common_version
BuildRequires: %{python}-devel
BuildRequires: %{python}-distro
%if 0%{?rhel} == 0 || 0%{?rhel} != 6
BuildRequires: %{python}-httmock
%endif
BuildRequires: %{rpm_python}
BuildRequires: asciidoc
BuildRequires: dist-git-client
Expand Down
18 changes: 4 additions & 14 deletions rpmbuild/tests/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
import distro
import pytest

try:
from httmock import urlmatch, HTTMock

@urlmatch(netloc=r'(.*\.)?example\.com$')
def example_com_match(url, request):
return 'some-content'
from httmock import urlmatch, HTTMock

except:
pass
@urlmatch(netloc=r'(.*\.)?example\.com$')
def example_com_match(url, request):
return 'some-content'


from copr_rpmbuild.providers.spec import UrlProvider
Expand Down Expand Up @@ -79,9 +75,6 @@ def auto_test_setup(self):
def auto_test_cleanup(self):
self.cleanup_basic_dirs()

@pytest.mark.skipif(distro.id() in ['rhel', 'centos'] and
distro.major_version() == '6',
reason='on httmock on rhel6')
def test_srpm_query_string(self):
with HTTMock(example_com_match):
provider = UrlProvider(self.json_1, self.config)
Expand All @@ -93,9 +86,6 @@ def test_srpm_query_string(self):
with open(file, 'r') as f:
assert f.read() == 'some-content'

@pytest.mark.skipif(distro.id() in ['rhel', 'centos'] and
distro.major_version() == '6',
reason='on httmock on rhel6')
def test_spec_query_string(self):
with HTTMock(example_com_match):
provider = UrlProvider(self.json_2, self.config)
Expand Down

0 comments on commit 1c61875

Please sign in to comment.