39 Commits

Author SHA1 Message Date
Martin Kopec
0395f676ab Clean requirements, add pip check job
Removes redundant requirements and adds a new job which runs
'tox -epip-check-reqs' in order to avoid having redundant
dependencies specified or missing some.

Change-Id: I5ca35922213cfbe4c2b4b49388bffcc0b8fc6a96
2021-06-23 12:50:15 +00:00
Martin Kopec
052de8653b Replace six by python3 code style
As we have already dropped python2 support,
usage of six module is redundant.
The patch also edits the classifiers in setup.cfg
which comply with the wallaby cycle goals.

Change-Id: I2b0e4050e489ddfc7cbabe4165d5499ba6788422
2021-01-11 20:33:56 +00:00
Martin Kopec
a1f2375875 Inclusive jargon
tox deprecated its whitelist_externals option in
3.18 release. The patch bumps the min version of tox
to 3.18 and renames the option from whitelist_externals
to allowlist_externals.

Change-Id: I12d4bb75839adf78c17e8e562535fbf0d7e2e816
2021-01-09 15:26:19 +00:00
Goutham Pacha Ravi
78c4ce8ac8 Fix broken links and redirects
This repository is hosted on opendev.org's
gitea server, and doesn't get mirrored to
github currently (we may add mirroring in
the future). We can swap a bunch of URLs
that assume the content is on github and
older infra cgit servers with correct URLs.

Meetings have moved from IRC to MeetPad,
fix the corresponding details in the README.

Also use this commit to strip trailing
whitespaces across the repository.

Change-Id: Ica0a7ba08d9c437f94fbc9ab282bd929f01df8ff
2021-01-08 21:17:29 +00:00
Martin Kopec
35b3a1da4f Fix CI, Drop python2 and 3.5, update jobs to python3
* Starting in mysql8, we can't expect a db user to be
  created with the GRANT command, we'll need to create
  one explicitly.

* OpenStack has dropped the py2.7 and py3.5 support
  in ussuri cycle. From now on, refstack will test only
  with py3 jobs. Complete discussion & schedule can be
  found in
  - http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
  - https://etherpad.openstack.org/p/drop-python2-support

  Ussuri Communtiy-wide goal:
  https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

* Replace the "refstack-tox-py36-func-mysql" with
  "refstack-tox-functional" to simplify naming and use the system default
  python3 version for this functional job.

* replace testr unit test runner by stestr. testr runner hasn't been updated
  for ~ 6 years - stestr is its successor

Story: 2003257
Task: 24062
Change-Id: I90ab2eca6366f0b6256f097712efac2ffe08b2c0
2020-12-18 20:59:21 +00:00
Elod Illes
91c56ed9a1 Add local bindep.txt and py36-func-mysql job
As it was announced [1] global bindep-fallback.txt was removed and now
projects need to have a local bindep.txt to be able to install binary
dependencies for testing.

In test jobs the script tools/test-setup.sh is called which requires
mysql and postgres servers and clients to be installed.

To eliminate 'ERROR: InterpreterNotFound: python3.5' of the zuul job
refstack-tox-py35-func-mysql, simply replace the tox environment
py35-func-mysql to py36-func-mysql with a base python of 3.6 instead of
3.5 and rename the zuul job to contain py36 in the name.

Update the Zuul template to use nodejs6 jobs, this makes the single jobs
obsolete, remove them. Without this change, the gate will use
nodejs4 and fail.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html

Change-Id: I90cb912befb9d09fed330bd8d27a491caffbf7b9
2019-09-14 20:35:16 +02:00
Chris Hoge
4595c1f0b6 Disable anonymous result upload
This patch disables anonymous test result uploads. It also
fixes a python35 incompatability uncovered by more extensive
testing of signing uploads (bytes can no longer be decoded).
Also updated coverage tests to not include tests in coverage.

Co-Authored-By: megan guiney <meganmguiney@gmail.com>

Change-Id: I3f19f1399eb2948eaf8340b5c4be18b698c7e139
2018-01-11 01:26:34 -08:00
Luz Cazares
b041333bc7 Add support for new doc PTI jobs
Implement optional cleanup to support the new PTI jobs
for documentation which won't use tox anymore.

Docs tox environment will still available for developers but
it is no loger used in the gate to construct the documentation.

See http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: Ib4a380eec3c9f286dc563f2b81c6b27f92467cf3
2017-12-18 15:46:17 -08:00
Luz Cazares
45f00cc13f Add debug environment to tox
Change-Id: Idd01fa7ebc9171796242bcea70cae3708b86a19f
2017-10-20 02:14:17 +00:00
Megan Guiney
3f3e80d7e6 Add name scheme update script for alembic version table
The goal of this patch is to buil in the ability to upgrade
the alembic version table of both new and existing RefStack
databases in order to allow for the usage of subunit2sql tooling
within the existing db, thus facilitating the upload and storage
of subunit data in RefStack server.

[TEST CASES HANDLED]
* default name  -> nondefault name
* nondefault name -> default name
* nondefault -> another nondefault

[OTHER ACTION ITEMS]
* tighten up workflow for cleaner code

Change-Id: I7aa0965b22a46439d66c81108fc0b8947316579d
2017-10-16 21:11:49 +00:00
Jenkins
5f94bbe0d8 Merge "Include tools folder in tox pep8 env" 2017-10-06 22:00:59 +00:00
Jenkins
2c9fbd8c00 Merge "Assert style fix" 2017-10-03 20:40:28 +00:00
Luz Cazares
fba8104512 Include tools folder in tox pep8 env
Enable tox to run pep8 against tools directory.

Change-Id: I8ed1836bd969b18d8fe6c64b4c3c0e2d64204009
2017-09-29 20:56:05 +00:00
howardlee
004e1fec87 Assert style fix
[H203] Use assertIs(Not)None to check for None (off by default) Unit
test assertions tend to give better messages for more specific
assertions. As a result, assertIsNone(...) is preferred over
assertEqual(None, ...) and assertIs(None, ...), and
assertIsNotNone(...) is preferred over assertNotEqual(None, ...) and
assertIsNot(None, ...). Off by default.

Change-Id: I2c1a179ba1a413cbea269f9574779bb5451441b2
2017-09-26 11:41:31 -07:00
M V P Nitesh
8ad9fd110d Add 'rm -f .testrepository/times.dbm' command in testenv
Running py2* post py3* tests results in error. Add
'rm -f .testrepository/times.dbm' command in testenv to
resolve this.

Change-Id: Id23d6edfe6980680420141d01f36181194135ca6
2017-06-06 16:37:00 +05:30
Jenkins
08d28cf61a Merge "Added sphnix build folder location" 2017-03-22 19:03:42 +00:00
Luz Cazares
057c7c2f11 Added sphnix build folder location
Added sphnix build folder location. Added Ocata implemented specs.
Fix registered sign character.

Change-Id: I27a8db968dbb029f370f46b77f3d2be1d85a45ca
2017-03-21 15:53:30 +00:00
Paul Van Eck
9ea5721d51 Enable py35 functional test env
This patch also adds the necessary changes to fix py35 compatibility
and ensure that the current functional/unit tests pass.

Change-Id: Iaced98e98db29882a35bea1abd98e50dd167b511
2017-03-15 11:12:46 -07:00
Jenkins
edfadd5245 Merge "Update coverage job" 2017-02-15 23:25:47 +00:00
Luz Cazares
f1ed8079ec Added tox target which checks requirements.txt
New tox target check that there is no missing or superfluous (unused)
requirements in requirements.txt.

Patch is copy/paste from Iff37af95269c38e4d435a53a21e5d60e2c5a3fa8
which do the same for Tempest projec.

This change also includes the fixes to requirements.txt needed
to pass the new tests.

Change-Id: Id52c5b140647268525120373ac19a63f72b12462
2017-02-14 21:58:43 +00:00
sslypushenko
c6c9877dac Update coverage job
Rename old coverage job to gen-cover. Setup new cover job
which should use tool/cover.sh.

Change-Id: I52f6e87b797270c784f0af9ad6fa788d9435dab5
2017-02-14 21:18:22 +02:00
Luz Cazares
95e79460e7 Rename cover tox environment to fix gate failure
Coverage gate job, added on I0906930940c86293deb605d56ba518913152254a
is looking for 'cover' tox environment instead of current 'py27-cover',
this change rename cover environment to fix gate job failure.

Change-Id: I3b2b44593874768db1340ffe2afe2d0db9ce8efb
2017-01-31 21:40:01 +00:00
Jenkins
05a0547772 Merge "Use upper-constraints for tox envs" 2017-01-28 00:30:01 +00:00
Cao Xuan Hoang
bf5ccb3f07 Remove support for py33
Python 3.3 is not supported from Mitaka, as per Infra.
This patch removes the support for the same.

Change-Id: I3aa689a1c88abe274f492cf90f7c10f9b07f5553
2017-01-23 08:24:47 +07:00
Rajiv Kumar
4c496737a6 Use upper-constraints for tox envs
Pin tox environments to upper-constraints to avoid conflicts with
library releases.

Change-Id: I46ba7cf37c52612c87d4db5086efe1a8b7c9f4a5
2017-01-12 10:15:33 +05:30
Ondřej Nový
96cd9d2134 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I3320fa85bd54295cc78ce4ec6a0fd078cf2780c6
2015-12-11 23:32:58 +01:00
sslypushenko
59822ee4c4 Added PEP 0257 check
Because, lack of inline docs is a big problem all over OpenStack

Change-Id: I54e1756d9984996cd1d509482b9c9a9d60dbef16
2015-07-02 13:45:58 +00:00
Vladislav Kuzmin
49f1efc773 Add unit tests for untested code
Add unit tests and '# pragma: no cover'
for exclude some code that doesn't require test.

Change-Id: Ib071208bd38c7b1102aa341be0d6bf803b647596
2015-03-19 10:58:51 +03:00
Vladislav Kuzmin
7fb06e8317 Repair tests coverage utility
Add requirements for coverage utility.
It makes it possible to run `tox -e py27-cover`
and 'cover' directory will generated with
tests coverage report in HTML format.

Change-Id: I38c4197246fab4d0b8ea9ba3c61cc10966a1fc9e
2015-03-19 10:58:51 +03:00
Vladislav Kuzmin
05e0433f10 Increase test coverage for database migration
Change-Id: If091d16827beccc82878eb1478ec2bff349cb58a
2015-03-17 11:38:48 +03:00
Vladislav Kuzmin
16affe2d12 Improve database creation for testing
Create MySQL database before starting tests and cleanup after that.
MySQL database is able to work in standalone mode where establish
connection using a Unix domain socket.
This patch makes it possible to perform functional tests with `tox -e py27-func-mysql`.
If an enviroment variable REFSTACK_TEST_MYSQL_URL is set then tests will run with it
and a database will not be created.
Update test requirements.

Change-Id: I0cdba19701bbf06109e78f78f275038caeecd881
2015-03-06 10:14:04 +03:00
Vladislav Kuzmin
9ac0db3253 Add oslo.log library
Add oslo.log lib in application.
Move API related options from refstack/api/config.py
to the oslo_config's configuration file.
Make regeneration of example config file with oslo.log namespace
and with moved API options.

Change-Id: Id0db95fe34eb8faa284e9d716cbeebdf6d25c183
2015-02-12 15:25:50 +04:00
Vladislav Kuzmin
54e2a86d22 Add config auto generator
Add possibility to generate a config file with default values.
Run `tox -e genconfig` and etc/refstack.conf.sample appears.

Change-Id: Ie7c7d90ec056ad254f4247d4b0adc06bdd096ee6
2015-02-09 11:31:06 +04:00
Vladislav Kuzmin
4e390ee67b Add oslo libraries and command-line utility
Add oslo libraries for works with database and config.
Refactor database relation code. Move it in refstack/db.

Now after istallation of refstack available a command-line
utility: `refstack-manage` and `refstack-api`.

`refstack-manage`

This utlity provide commands for manipulation of database
migrations and setup config file through
--config-file /path/to/refstack.conf option.

Config file should contain database connection string.
For example:

[DEFAULT]
sql_connection = mysql://root:passw0rd@127.0.0.1/refstack

Add ability to runtime updrade/downgrade db through command-line utillity.

`refstack-api`

This utility allow to launch api on gunicorn server. Specify config through
--env REFSTACK_OSLO_CONFIG=/path/to/refstack.conf

Change-Id: Ibea97d433d54d307233aa04e9487f1a1230e7487
2015-02-04 16:54:59 +04:00
sslypushenko
88a24238fa API with DB
Change-Id: Iedf19086d7e0fde059cfbaedc92b8ac1ff297cfc
2015-01-19 18:35:56 +02:00
Jeremy Stanley
357f09f0cf Work toward Python 3.4 support and testing
Change-Id: I51f983b651f645a2f3005dfdd10c25c8b25b8d84
2014-09-03 20:06:20 +00:00
sslypushenko
b70482622c py33 tests fixed
Some requirements were updated to py33 compiliant versions.
Also imports were modified according to py33 compatibility.
https://storyboard.openstack.org/#!/story/117

Change-Id: I4422f1bcfb02fd27b0c275ef58b19fdfb386cd17
2014-07-22 09:37:21 +00:00
david
95e4b24f63 added py33 and removed py26 from tox.ini
Change-Id: Ie3e0be47ff96433583816bb4feb421548c17d6b6
2014-06-09 16:52:33 -07:00
david
13ecce15f5 added tox.ini
Change-Id: I8ba7000fa12227487f2777ebeca4b30f202364aa
2014-03-01 17:36:44 -08:00