diff --git a/0.2.4.tar.gz b/0.2.4.tar.gz new file mode 100644 index 0000000..ed08c21 --- /dev/null +++ b/0.2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb0596c54b67f5f521aa27bd0f3a638319b9fccc7afd9802b140d8699b39b668 +size 25789 diff --git a/openapi-spec-validator-0.2.4.tar.gz b/openapi-spec-validator-0.2.4.tar.gz deleted file mode 100644 index 242026c..0000000 --- a/openapi-spec-validator-0.2.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14684aaec4c4f30e911132ffad3c5863047908251647f49114d249dcc2d41f4e -size 20936 diff --git a/openapi-spec-validator-skip-urls.patch b/openapi-spec-validator-skip-urls.patch new file mode 100644 index 0000000..8efea44 --- /dev/null +++ b/openapi-spec-validator-skip-urls.patch @@ -0,0 +1,87 @@ +Index: openapi-spec-validator-0.2.4/tests/integration/test_shortcuts.py +=================================================================== +--- openapi-spec-validator-0.2.4.orig/tests/integration/test_shortcuts.py ++++ openapi-spec-validator-0.2.4/tests/integration/test_shortcuts.py +@@ -78,6 +78,7 @@ class TestLocalPetstoreExample(BaseTestV + return factory.spec_from_file("data/v3.0/petstore.yaml") + + ++@pytest.mark.skip + class TestPetstoreV2Example(BaseTestValidValidteV2SpecUrl): + + @pytest.fixture +@@ -88,7 +89,7 @@ class TestPetstoreV2Example(BaseTestVali + 'yaml/petstore.yaml' + ) + +- ++@pytest.mark.skip + class TestApiV2WithExampe(BaseTestValidValidteV2SpecUrl): + + @pytest.fixture +@@ -99,7 +100,7 @@ class TestApiV2WithExampe(BaseTestValidV + 'yaml/api-with-examples.yaml' + ) + +- ++@pytest.mark.skip + class TestPetstoreV2ExpandedExample(BaseTestValidValidteV2SpecUrl): + + @pytest.fixture +@@ -110,7 +111,7 @@ class TestPetstoreV2ExpandedExample(Base + 'yaml/petstore-expanded.yaml' + ) + +- ++@pytest.mark.skip + class TestPetstoreExample(BaseTestValidValidteSpecUrl): + + @pytest.fixture +@@ -121,7 +122,7 @@ class TestPetstoreExample(BaseTestValidV + 'petstore.yaml' + ) + +- ++@pytest.mark.skip + class TestApiWithExampe(BaseTestValidValidteSpecUrl): + + @pytest.fixture +@@ -132,7 +133,7 @@ class TestApiWithExampe(BaseTestValidVal + 'api-with-examples.yaml' + ) + +- ++@pytest.mark.skip + class TestPetstoreExpandedExample(BaseTestValidValidteSpecUrl): + + @pytest.fixture +Index: openapi-spec-validator-0.2.4/tests/integration/test_validate.py +=================================================================== +--- openapi-spec-validator-0.2.4.orig/tests/integration/test_validate.py ++++ openapi-spec-validator-0.2.4/tests/integration/test_validate.py +@@ -64,6 +64,7 @@ class TestLocalParentReferenceExample(Ba + return factory.spec_from_file(self.spec_file) + + ++@pytest.mark.skip + class TestPetstoreExample(BaseTestValidOpeAPIv3Validator): + + @pytest.fixture +@@ -75,7 +76,7 @@ class TestPetstoreExample(BaseTestValidO + ) + return factory.spec_from_url(url) + +- ++@pytest.mark.skip + class TestApiWithExampe(BaseTestValidOpeAPIv3Validator): + + @pytest.fixture +@@ -87,7 +88,7 @@ class TestApiWithExampe(BaseTestValidOpe + ) + return factory.spec_from_url(url) + +- ++@pytest.mark.skip + class TestPetstoreExpandedExample(BaseTestValidOpeAPIv3Validator): + + @pytest.fixture diff --git a/python-openapi-spec-validator.changes b/python-openapi-spec-validator.changes index 4ccff01..44dc3ec 100644 --- a/python-openapi-spec-validator.changes +++ b/python-openapi-spec-validator.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Aug 8 11:31:08 UTC 2018 - tchvatal@suse.com + +- Add patch to disable tests that poke live URL: + * openapi-spec-validator-skip-urls.patch + +------------------------------------------------------------------- +Wed Aug 8 11:15:20 UTC 2018 - tchvatal@suse.com + +- Switch to github tarball to run tests +- Fix runtime deps + ------------------------------------------------------------------- Mon Jul 30 16:24:46 UTC 2018 - sean.marlow@suse.com diff --git a/python-openapi-spec-validator.spec b/python-openapi-spec-validator.spec index 92fecf8..eba638a 100644 --- a/python-openapi-spec-validator.spec +++ b/python-openapi-spec-validator.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-openapi-spec-validator Version: 0.2.4 @@ -22,19 +23,22 @@ Release: 0 Summary: Validates OpenAPI Specs against Swagger and OAS3 License: Apache-2.0 Group: Development/Languages/Python -Url: https://github.com/p1c2u/openapi-spec-validator -Source: https://files.pythonhosted.org/packages/source/o/openapi-spec-validator/openapi-spec-validator-%{version}.tar.gz +URL: https://github.com/p1c2u/openapi-spec-validator +Source: https://github.com/p1c2u/openapi-spec-validator/archive/%{version}.tar.gz +Patch0: openapi-spec-validator-skip-urls.patch +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module jsonschema} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: %{python_module setuptools} -Requires: python-jsonchema Requires: python-PyYAML +Requires: python-jsonschema Requires: python-six -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch Requires(post): update-alternatives Requires(postun): update-alternatives - +BuildArch: noarch %python_subpackages %description @@ -45,6 +49,7 @@ for full compliance with the Specification. %prep %setup -q -n openapi-spec-validator-%{version} +%patch0 -p1 %build %python_build @@ -60,12 +65,13 @@ for full compliance with the Specification. %postun %python_uninstall_alternative openapi-spec-validator +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} + %files %{python_files} -%defattr(-,root,root,-) %doc README.md %license LICENSE %python_alternative %{_bindir}/openapi-spec-validator %{python_sitelib}/* %changelog -