From 3e4e0d891cd8b302e046f05f4195968a90350a55 Mon Sep 17 00:00:00 2001 From: yatin Date: Fri, 22 Jun 2018 11:03:00 +0530 Subject: [PATCH] Create tests package for keystone and glance Exclude tests from python package, instead create a new subpackage to ship tests for keystone and glance. Also Fix: [keystone] username:- %{keystone} --> keystone [glance] api package dependency on base package Change-Id: I65d8e5de9f524ed09aa306a8ab82d3117c1b6e27 --- openstack/glance/glance.spec.j2 | 25 ++++++++++++++++++++++++- openstack/keystone/keystone.spec.j2 | 22 +++++++++++++++++++--- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/openstack/glance/glance.spec.j2 b/openstack/glance/glance.spec.j2 index ceae173d3..11b7276a9 100644 --- a/openstack/glance/glance.spec.j2 +++ b/openstack/glance/glance.spec.j2 @@ -141,6 +141,24 @@ OpenStack Swift project. This package contains the Glance Python library. +%package -n python3-{{ pypi_name }}-tests +Summary: Glance tests +Requires: openstack-{{ pypi_name }} = %{epoch}:%{version}-%{release} +Provides: python-glance-tests = %{epoch}:%{version}-%{release} + +%description -n python3-{{ pypi_name }}-tests +The Glance project provides a service where users can upload and discover +data assets that are meant to be used with other services. This currently +includes images and metadata definitions. +Glance image services include discovering, registering, and retrieving +virtual machine images. Glance has a RESTful API that allows querying of +VM image metadata as well as retrieval of the actual image. +VM images made available through Glance can be stored in a variety of +locations from simple filesystems to object-storage systems like the +OpenStack Swift project. + +This package contains the Glance test files. + %if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Image Service @@ -183,7 +201,7 @@ This package contains the documentation. %package api Summary: OpenStack Image service (Glance) - API Group: Development/Languages/Python -Requires: python3-{{ pypi_name }} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description api The Glance project provides a service where users can upload and discover @@ -344,6 +362,11 @@ OS_TEST_PATH=./glance/tests/unit PYTHONPATH=. stestr-3 run %defattr(-,root,root,-) %license LICENSE %{python3_sitelib}/{{ pypi_name }}* +%exclude %{python3_sitelib}/glance/tests + +%files -n python3-{{ pypi_name }}-tests +%license LICENSE +%{python3_sitelib}/{{ pypi_name }}/tests %if 0%{?with_doc} %files doc diff --git a/openstack/keystone/keystone.spec.j2 b/openstack/keystone/keystone.spec.j2 index 8e91a5b10..21b4d103c 100644 --- a/openstack/keystone/keystone.spec.j2 +++ b/openstack/keystone/keystone.spec.j2 @@ -119,6 +119,17 @@ Keystone is a Python implementation of the OpenStack (http://docs.openstack.org/developer/keystone/) identity service API. This package contains the Keystone Python library. +%package -n python3-{{ pypi_name }}-tests +Summary: Keystone tests +Requires: openstack-{{ pypi_name }} = %{epoch}:%{version}-%{release} +Provides: python-keystone-tests = %{epoch}:%{version}-%{release} + +%description -n python3-{{ pypi_name }}-tests +Keystone is a Python implementation of the OpenStack +(http://docs.openstack.org/developer/keystone/) identity service API. + +This package contains the Keystone test files. + %package doc Summary: Documentation for OpenStack Identity Service Group: Documentation/HTML @@ -242,9 +253,9 @@ stestr-3 run --black-regex keystone.tests.unit.test_policy.GeneratePolicyFileTes %config(noreplace) %attr(0640, keystone, keystone) %{_sysconfdir}/keystone/keystone.policy.yaml %config(noreplace) %attr(0640, keystone, keystone) %{_sysconfdir}/keystone/sso_callback_template.html %config(noreplace) %{_sysconfdir}/logrotate.d/openstack-keystone -%dir %attr(0750, %{keystone}, %{keystone}) %{_localstatedir}/lib/keystone -%dir %attr(0750, %{keystone}, %{keystone}) %{_localstatedir}/log/keystone -%dir %attr(0750, %{keystone}, %{keystone}) %{_localstatedir}/cache/keystone +%dir %attr(0750, keystone, keystone) %{_localstatedir}/lib/keystone +%dir %attr(0750, keystone, keystone) %{_localstatedir}/log/keystone +%dir %attr(0750, keystone, keystone) %{_localstatedir}/cache/keystone %{_sysconfdir}/sysctl.d/openstack-keystone.conf %files -n python3-keystone @@ -253,6 +264,11 @@ stestr-3 run --black-regex keystone.tests.unit.test_policy.GeneratePolicyFileTes %license LICENSE %{python3_sitelib}/keystone* %{python3_sitelib}/keystone-*.egg-info +%exclude %{python3_sitelib}/{{ pypi_name }}/tests + +%files -n python3-{{ pypi_name }}-tests +%license LICENSE +%{python3_sitelib}/{{ pypi_name }}/tests %files doc %license LICENSE