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 4, 2024
1 parent cfd0e8f commit b5b7c84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 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
19 changes: 4 additions & 15 deletions rpmbuild/tests/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@

import os
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 +74,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 +85,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 b5b7c84

Please sign in to comment.