summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Repair string-based disconnect filters for MySQL, DB2"1.3.0Jenkins2014-12-122-8/+29
|\
| * Repair string-based disconnect filters for MySQL, DB2Mike Bayer2014-12-122-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two regexp-based filters in exc_filters.py->_is_db_connection_error() were both incorrectly formed. The tests for these filters would pass because the fixture also set the is_disconnect flag to True, which normally would be set by SQLAlchemy, and therefore the _raise_operational_errors_directly_filter() or possibly the _raise_for_remaining_DBAPIError() filters would catch this, view the is_disconnect flag as True, and promote to a DBConnectionError. However, the _is_db_connection_error() filters are intended to work independently of whether this flag is set; so two new tests are added which unset the flag, and ensure that the exception messages as given are caught here. Change-Id: I37ddd669b89669730ae1ff07c7bc7a6ba5705f67
* | Merge "Upgrade exc_filters for 'engine' argument and connect behavior"Jenkins2014-12-124-25/+61
|\ \ | |/
| * Upgrade exc_filters for 'engine' argument and connect behaviorMike Bayer2014-12-064-25/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch applies upgrades to the sqlalchemy/exc_filters.py and sqlalchemy/compat/handle_error.py compatibility layers to accommodate new changes in SQLAlchemy 1.0. SQLA 1.0 will now route errors that occur upon connect through the handle_error() event, just like any other, so that when 1.0 is present we no longer need to use exc_filters.handle_connect_error; the method becomes a passthrough as far as running the event handler. Additionally, SQLAlchemy 1.0 has added the "engine" parameter to ExceptionContext, specifically to suit the case when the initial connect has failed and there is no Connection object; the compatibility layer here now emulates this behavior for SQLAlchemy versions prior to 1.0. Change-Id: I61714f3c32625a621eaba501d20346519b8b12c7
* | Merge "Updated from global requirements"Jenkins2014-12-111-1/+1
|\ \
| * | Updated from global requirementsOpenStack Proposal Bot2014-12-111-1/+1
| | | | | | | | | | | | Change-Id: I976f8b8a7b3d31c7046ed53f6564c58af408b1b2
* | | Fix python3.x scoping issues with removed 'uee' variableJoshua Harlow2014-12-111-2/+5
|/ / | | | | | | | | | | | | | | | | In python3.x the 'uee' variable will be removed from the scope after the except block exits (if it ever is entered) so we need to use a different variable name to ensure that it will not be deleted so we can use it later. Change-Id: Ia86a2bd1a46e57eaf47704eadc991fd0c9b08661
* | Merge "Fix TestConnectionUtils to py3x compatibility"Jenkins2014-12-101-6/+6
|\ \
| * | Fix TestConnectionUtils to py3x compatibilityVictor Sergeyev2014-12-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests in TestConnectionUtils class depends on database and DB connector, so the simplest way to run them with python 3.X is to use same database and connector for the both python versions. PostgreSQL and psycopg2 are looks good for this. Replaced ``mysql`` to ``postgresql`` in TestConnectionUtils. Change-Id: Icb1d6324b58feed515e4eb885715cbf2195768cf
* | | Merge "Fix test_migrate_cli for py3"Jenkins2014-12-091-2/+4
|\ \ \ | |/ / |/| |
| * | Fix test_migrate_cli for py3Oleksii Chuprykov2014-12-091-2/+4
| | | | | | | | | | | | | | | | | | Use __lt__ insted of __cmp__ for py3 compatability. Change-Id: I85d8eeb2cbb754b72b04c817f49d3a62f1473994
* | | Merge "Fix nested() for py3"Jenkins2014-12-091-3/+1
|\ \ \
| * | | Fix nested() for py3Oleksii Chuprykov2014-11-241-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nested() should return enter_context instead of nothing. Change-Id: I910eace453d07e2f9a12dd0ce0eca22f4d155472
* | | | Updated from global requirementsOpenStack Proposal Bot2014-12-081-1/+1
| |_|/ |/| | | | | | | | Change-Id: I3443352b9ec847534cf4016dc540da769501593b
* | | Workflow documentation is now in infra-manualJeremy Stanley2014-12-051-4/+3
| | | | | | | | | | | | | | | | | | | | | Replace URLs for workflow documentation to appropriate parts of the OpenStack Project Infrastructure Manual. Change-Id: I318dea15e0d2f7ef22427fe22d8d57173e60e784
* | | Merge "Imported Translations from Transifex"1.2.0Jenkins2014-11-284-4/+133
|\ \ \ | |_|/ |/| |
| * | Imported Translations from TransifexOpenStack Proposal Bot2014-11-284-4/+133
| |/ | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I7e50cf461b9ff7344a00a63f35709667c9ec857b
* | Merge "Make test_models pass on py3"Jenkins2014-11-281-19/+12
|\ \
| * | Make test_models pass on py3Oleksii Chuprykov2014-11-211-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check that models.ModelBase is iterable. Remove checking on next() method since models.modelBase isn't actually iterator. Remove unnecessary checks from TimestampMixinTest Change-Id: Ibbde0e49bec25e1acddaf64f03083cf46481a581
* | | Merge "Repair include_object to accommodate new objects"Jenkins2014-11-281-2/+5
|\ \ \ | |_|/ |/| |
| * | Repair include_object to accommodate new objectsMike Bayer2014-11-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests in tests/sqlalchemy/test_migrations.py which expect to see changes in unique constraints fail due to the assumption that the "include_object" feature of Alembic only deals with the 'table' and 'column' constructs. As Alembic 0.7.0 has added include_object support for 'index' and 'unique_constraint', this method should not be limiting itself to not include objects that it's testing for. Tests won't pass on Alembic 0.7.0 without this patch. Change-Id: Ia71446bb8c0b248c6310534deb290524e3946987
* | | Merge "Add info on how to run unit tests"Jenkins2014-11-211-0/+39
|\ \ \
| * | | Add info on how to run unit testsVictor Sergeyev2014-11-191-0/+39
| | |/ | |/| | | | | | | Change-Id: I7178fb2ca6e17d7428a44ec2cefe0634bb134634
* | | Merge "Add table name to foreign keys diff"Jenkins2014-11-211-1/+1
|\ \ \
| * | | Add table name to foreign keys diffOleksii Chuprykov2014-11-201-1/+1
| |/ / | | | | | | | | | | | | | | | | | | Add table to diff that is generated by check_foreign_keys function. Change-Id: Ib771ea49e873dd87cccacf6ec7463d6e005372a3
* | | Merge "Add exception filter for _sqlite_dupe_key_error"Jenkins2014-11-212-3/+22
|\ \ \ | |_|/ |/| |
| * | Add exception filter for _sqlite_dupe_key_errorOleksii Chuprykov2014-11-192-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can get 'PRIMARY KEY must be unique' error on some platforms and versions of sqlite library while trying to insert the row with the same primary key that already exist. In this case oslo.db should raise DBDuplicateEntry error. Add corresponding filter to _sqlite_dupe_key_error Closes-Bug: #1386145 Change-Id: Ifafd6a8e0b613a31e596043071aef4d410a976f2
* | | Merge "Updated from global requirements"Jenkins2014-11-202-2/+2
|\ \ \
| * | | Updated from global requirementsOpenStack Proposal Bot2014-11-202-2/+2
| | | | | | | | | | | | | | | | Change-Id: I8a909d181302ea1c898dcdf1ce13a9e4681217f8
* | | | Merge "Handle Galera deadlock on SELECT FOR UPDATE"Jenkins2014-11-202-0/+9
|\ \ \ \ | |/ / / |/| | |
| * | | Handle Galera deadlock on SELECT FOR UPDATERoman Podoliaka2014-11-192-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using nova-api in the wild shows that we've got an additional exception, that must be treated like a deadlock, so that we can handle this error properly and retry the transaction. Closes-Bug: #1394298 Change-Id: If75f2b5984979fe55ad04ccec8713989307c56ae
* | | | Merge "Fix python3.x scoping issues with removed 'de' variable"Jenkins2014-11-191-3/+7
|\ \ \ \
| * | | | Fix python3.x scoping issues with removed 'de' variableJoshua Harlow2014-10-271-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In python3.x the 'de' variable will be removed from the scope after the except block exits (if it ever is entered) so we need to use a different variable name to ensure that it will not be deleted so we can use it later. This avoids errors of the format: UnboundLocalError: local variable 'de' referenced before assignment Change-Id: I9ea2bd6b3a8c392f8d27b0130dd6b7683fc44e7c
* | | | | Merge "Ensure is_backend_avail() doesn't leave open connections"Jenkins2014-11-191-1/+2
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Ensure is_backend_avail() doesn't leave open connectionsRoman Podoliaka2014-11-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is_backend_avail() helper function calls _ensure_backenv_available() method,which creates a SQLAlchemy engine and opens a test connection, but doesn't call engine.dispose(). Depending on Python interpreter version used, the connection in the pool may remain open for some time (even though, we don't store a reference to an Engine instance). Closes-Bug: #1393633 Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com> Change-Id: I0297af709ed18fed52308500c13054cb49adf401
* | | | | Merge "Add pbr to installation requirements"Jenkins2014-11-191-0/+1
|\ \ \ \ \
| * | | | | Add pbr to installation requirementsDoug Hellmann2014-11-081-0/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pbr to the list of installation requirements so that it is installed via pip before this library is installed, instead of with easy_install. This avoids issues like Bug #1384919, and ensures that projects that use this library as a dependency are properly installed. Related-Bug: #1384919 Change-Id: I6c155370dbd01fe4748d5137bdf288e8d3e1a67e
* | | | | Updated from global requirementsOpenStack Proposal Bot2014-11-182-2/+2
| |/ / / |/| | | | | | | | | | | Change-Id: Ic80266ad328243a91688bc573be7e49d026c4b1f
* | | | Merge "Assert exceptions based on API, not string messages"1.1.0Jenkins2014-11-141-98/+129
|\ \ \ \ | |_|_|/ |/| | |
| * | | Assert exceptions based on API, not string messagesMike Bayer2014-10-291-98/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests/sqlalchemy/test_exc_filters.py tests were asserting the exact string format of SQLAlchemy exceptions. SQLAlchemy is improving its exception format in version 1.0, thereby breaking these tests. Instead of supporting multiple string formats, change the assertions to compare specific fields per the oslo.db.exceptions and sqlalchemy.exc APIs. Change-Id: Ie98ac3ca82a1052c463ca9ca5d41e228935497b3
* | | | Imported Translations from TransifexOpenStack Proposal Bot2014-11-102-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Ic68faa63ccf1ae0af395643e97c0fc472848ac3e
* | | | Merge "Reorganize DbTestCase to use provisioning completely"Jenkins2014-11-086-170/+543
|\ \ \ \
| * | | | Reorganize DbTestCase to use provisioning completelyMike Bayer2014-10-226-170/+543
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is the first part in a series of changes that will allow for full flexibility in database usage during tests. The first step is to add more facility to the oslo.db.sqlalchemy.provision system, implementing a dispatch system that allows flexibility in creation and dropping of databases, as well as moving the awareness of the "openstack_citest" convention into provisioning. The OpportunisticFixture and OpportunisticTestCase now fold into DbFixture and DbTestCase, which defers in a simple way to provision.ProvisionedDatabase for all connectivity. ProvisionedDatabase in turn decides based on the given environment as to how an engine should be provisioned for a given test. Control of database connectivity remains via the OS_TEST_DBAPI_ADMIN_CONNECTION environment variable. When not set, connectivity defaults to sqlite://, plus those backends found to be available using "opportunistic" naming conventions. When the variable is present, it provides a semicolon-delimited list of URLs, and only those URLs will be used for initial connectivity. Future changes will allow provisioning to hold onto a single database engine per test run, as well as allow a single test class to run in multiple backend scenarios (e.g. one test against many different backends). Change-Id: Ifc02505c4c8ebd4a1ca56e14f76c0989576875c3 Partial-Bug: #1339206
* | | | | Merge "Activate pep8 check that _ is imported"Jenkins2014-11-081-1/+0
|\ \ \ \ \
| * | | | | Activate pep8 check that _ is importedJames Carey2014-10-311-1/+0
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the specification in tox.ini that _ is a builtin so that it will no longer assume that _ does not need to be imported. This helps ensure that the _ from i18n is used. Activating this check did not flag any violations. Change-Id: Idc4d6259d4eb2db66e7122535bc42f8647049a06
* | | | | Updated from global requirementsOpenStack Proposal Bot2014-11-052-2/+2
|/ / / / | | | | | | | | | | | | Change-Id: I83bd22b11ca85eee8fb3dedceef4d9ac00343c38
* | | | Updated from global requirementsOpenStack Proposal Bot2014-10-271-1/+1
| |_|/ |/| | | | | | | | Change-Id: Iaed3965166e01fcaf0e9da75ffea3426cda0750e
* | | Updated from global requirementsOpenStack Proposal Bot2014-10-222-2/+2
|/ / | | | | | | Change-Id: I215a53a00948b6477ba9d493df8b0ea6ef6e6d83
* | Merge "ModelsMigrationsSync: Add check for foreign keys"Jenkins2014-10-212-2/+85
|\ \ | |/ |/|
| * ModelsMigrationsSync: Add check for foreign keysAnn Kamyshnikova2014-10-172-2/+85
| | | | | | | | | | | | | | Add method that checks that foreign keys in models are synchonized with foreign keys that are created in database. Change-Id: I4a776da0f53a79218ed4b111cac33b37d264fa1b