[Mailman-Developers] Problem getting tox to use mysql

Abhilash Raj maxking at asynchronous.in
Sun Oct 8 17:16:19 EDT 2017


On Sun, Oct 8, 2017, at 01:14 PM, Mark Sapiro wrote:
> I'm trying to work on the issue
> <https://gitlab.com/mailman/mailman/issues/385>.
> 
> I've been unable to make a test fail. I finally discovered that when I
> run 'tox -e py35-nocov-mysql' or 'tox -e py35-nocov-mysql -- -P hold',
> tox installs the pymysql dependency, but SQLAlchemy is still using the
> sqlite dialect when the tests run.
> 
> It appears I may need a [database] section in some mailman.cfg, but I
> don't know what I would put there for accessing the database, and I
> don't know where I'd put the .cfg.

This is the command that Gitlab CI runs, the environment variable below
is what
mailman uses for "extra" testing config.

   $ MAILMAN_EXTRA_TESTING_CFG=/home/runner/configs/mysql.cfg tox -e
   py35-nocov-mysql

The extra mysql.cfg is what holds the database configuration.

Hope that is helpful!

> Also, isn't this something tox should just do?

It can't without the knowledge of path to the extra configuration, hence
the environment variable.

> 
> I do think that when GitLab CI runs the mysql tests it does actually use
> mysql as I've seen mysql related failures there, but I don't seem to
> have the magic to make it work locally.
> 
> -- 
> Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
> San Francisco Bay Area, California    better use your sense - B. Dylan
> _______________________________________________
> Mailman-Developers mailing list
> Mailman-Developers at python.org
> https://mail.python.org/mailman/listinfo/mailman-developers
> Mailman FAQ: http://wiki.list.org/x/AgA3
> Searchable Archives:
> http://www.mail-archive.com/mailman-developers%40python.org/
> Unsubscribe:
> https://mail.python.org/mailman/options/mailman-developers/raj.abhilash1%40gmail.com
> 
> Security Policy: http://wiki.list.org/x/QIA9


-- 
  Abhilash Raj
  maxking at asynchronous.in


More information about the Mailman-Developers mailing list