There seems to be an issue when running the test suite with a PostgreSQL server available:
FAIL: test_list_tables (unittest_db.PostgresqlDatabaseSchemaTC)
----------------------------------------------------------------------
lTraceback (most recent call last):
File "/tmp/autopkgtest-lxc.v8uxhr8d/downtmp/build.elV/real-tree/test/unittest_db.py", line 391, in test_list_tables
self.assertNotIn('x', helper.list_tables(cursor))
AssertionError: 'x' unexpectedly found in [u'pg_statistic', u'pg_foreign_table', u'pg_authid', u'x', u'pg_user_mapping', u'pg_subscription', u'pg_largeobject', u'pg_type', u'pg_attribute', u'pg_proc', u'pg_class', u'pg_attrdef', u'pg_constraint', u'pg_inherits', u'pg_index', u'pg_operator', u'pg_opfamily', u'pg_opclass', u'pg_am', u'pg_amop', u'pg_amproc', u'pg_language', u'pg_largeobject_metadata', u'pg_aggregate', u'pg_statistic_ext', u'pg_rewrite', u'pg_trigger', u'pg_event_trigger', u'pg_description', u'pg_cast', u'pg_enum', u'pg_namespace', u'pg_conversion', u'pg_depend', u'pg_database', u'pg_db_role_setting', u'pg_tablespace', u'pg_pltemplate', u'pg_auth_members', u'pg_shdepend', u'pg_shdescription', u'pg_ts_config', u'pg_ts_config_map', u'pg_ts_dict', u'pg_ts_parser', u'pg_ts_template', u'pg_extension', u'pg_foreign_data_wrapper', u'pg_foreign_server', u'pg_policy', u'pg_replication_origin', u'pg_default_acl', u'pg_init_privs', u'pg_seclabel', u'pg_shseclabel', u'pg_collation', u'pg_partitioned_table', u'pg_range', u'pg_transform', u'pg_sequence', u'pg_publication', u'pg_publication_rel', u'pg_subscription_rel', u'sql_features', u'sql_implementation_info', u'sql_languages', u'sql_packages', u'sql_parts', u'sql_sizing', u'sql_sizing_profiles']
Any hints?
|
Comments
-
2019/06/04 13:40, written by dlaxalde
-
2019/06/04 17:06, written by lunar
- Install
- Configure networking in
- Create a test environment using
- Run test using:
-
2019/06/06 08:24, written by dlaxalde
-
2019/06/06 08:38, written by lunar
add commentI cannot reproduce on a debian buster, running
python3 -m tox -e py3
.Does the "CREATE SCHEMA tests" (line 342 in unittest_db.py) work?
This happens reliably with both Python 2.7 and Python 3 when running the test suite against the installed package using autopkgtest. See https://lists.cubicweb.org/pipermail/cubicweb-devel/2019-June/003087.html
To run the testsuite using the LXC runner, the procedure is the following:
lxc
/etc/lxc/default.conf
. Easiest setup might be to use a bridge.autopkgtest-build-lxc debian sid
Is this something that we can setup in sbuild (which we use in our CI at the moment)?
You can ask sbuild to run autopkgtest for you. In
sbuild.conf
or~/.sbuildrc
:$run_autopkgtest = 1; $autopkgtest_root_args = ''; $autopkgtest_opts = [ '-s', '--', 'lxc', '--sudo', 'autopkgtest-%r' ];
It might also make sense to run autopkgtest as another CI job. Ideally you trigger it again to validate change is runtime dependencies.