Skip to content

Ability to run flexibly run tests on different database drivers/backendsΒ #10

@davidjb

Description

@davidjb

The original version of django-mssql-backend utilised dj_database_url in order to provide a flexible way of specifying the database configuration when running tests, by way of environment variables (https://github.com/ESSolutions/django-mssql-backend/blob/master/testapp/settings.py#L1-L6). With this fork, that flexibility has been replaced with hard-coded settings in https://github.com/microsoft/mssql-django/blob/dev/testapp/settings.py, forcing one to edit that file to change the user/password/host/port/driver settings.

As a Mac/Linux user I'm using Docker and FreeTDS as the simplest/most convenient way in which to run up and connect to a test SQL Server on my OS (I recall there being issues installing the Microsoft ODBC driver) and do so on a custom port in order to be able to run tests for this project. The original setup in django-mssql-backend means that this was possible:

export DATABASE_URL='mssql://user:password@localhost:9999?engine=FreeTDS&host_is_server=True'
python manage.py test

whereas now in order to submit and test #9 I had to manually edit settings.py and be careful not to commit that change.

Is this or some level of flexibility for test execution able to be reinstated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions