Skip to content

Commit

Permalink
fix: Broken MySQL container startup. MYSQL_USER for root user can no …
Browse files Browse the repository at this point in the history
…longer be supplied to container.
  • Loading branch information
DanCardin committed Dec 3, 2021
1 parent 728cb3e commit 2561be4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 39 deletions.
60 changes: 25 additions & 35 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,92 @@
# Changelog

## [Unreleased](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.1.7...HEAD) (2021-12-03)

### Fixes

- Broken MySQL container startup. MYSQL_USER for root user can no longer be supplied to container.

### [v2.1.7](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.1.6...v2.1.7) (2021-12-01)

#### Fixes

* breaking changes required to support pymongo 4.0.

- breaking changes required to support pymongo 4.0. 8e9a079

### [v2.1.6](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.1.5...v2.1.6) (2021-11-22)

#### Fixes

* Preempt socket warnings produced by the client not being closed manually. 4b3d9e0
* readthedocs poetry error. 6369064

- Preempt socket warnings produced by the client not being closed manually. 4b3d9e0
- readthedocs poetry error. 6369064

### [v2.1.5](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.1.3...v2.1.5) (2021-11-22)

#### Features

* Add ability to change image when running pmr c8679ec
* Use sqlalchemy's event system to apply redshift behavior. 2455620
- Add ability to change image when running pmr c8679ec
- Use sqlalchemy's event system to apply redshift behavior. 2455620

#### Fixes

* Create pytest markers for all resources 1c7c449
* Avoid mocking all of psycopg2 in the name of redshift. 6f38823

- Create pytest markers for all resources 1c7c449
- Avoid mocking all of psycopg2 in the name of redshift. 6f38823

### [v2.1.3](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.1.2...v2.1.3) (2021-09-20)

#### Fixes

* Avoid deprecated sqlalchemy URL constructor. 3fa64d3

- Avoid deprecated sqlalchemy URL constructor. 3fa64d3

### [v2.1.2](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.1.1...v2.1.2) (2021-08-24)

#### Fixes

* support for sqlalchemy 1.3. 7fa4fda
* Use the proper MYSQL_USER env var for the mysql fixture. 648a0b1
* Resolve linting issues related to changing linter versions. 59a983f
* Address poor handling of SQL statement parsing for redshift. d0d7685

- support for sqlalchemy 1.3. 7fa4fda
- Use the proper MYSQL_USER env var for the mysql fixture. 648a0b1
- Resolve linting issues related to changing linter versions. 59a983f
- Address poor handling of SQL statement parsing for redshift. d0d7685

### [v2.1.1](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.1.0...v2.1.1) (2021-08-17)

#### Fixes

* Resolve linting issues related to changing linter versions. 7aebc6a
* Address poor handling of SQL statement parsing for redshift. 11c4b97

- Resolve linting issues related to changing linter versions. 7aebc6a
- Address poor handling of SQL statement parsing for redshift. 11c4b97

## [v2.1.0](https://github.com/schireson/schireson-pytest-mock-resources/compare/v2.0.0...v2.1.0) (2021-06-29)

### Features

* Add async support (postgres) f45b078

- Add async support (postgres) f45b078

## [v2.0.0](https://github.com/schireson/schireson-pytest-mock-resources/compare/v1.5.0...v2.0.0) (2021-06-02)


## [v1.5.0](https://github.com/schireson/schireson-pytest-mock-resources/compare/v1.4.1...v1.5.0) (2021-02-17)


### [v1.4.1](https://github.com/schireson/schireson-pytest-mock-resources/compare/v1.4.0...v1.4.1) (2020-10-08)

#### Fixes

* Support breaking changes in pytest 6. d6dba02

- Support breaking changes in pytest 6. d6dba02

## [v1.4.0](https://github.com/schireson/schireson-pytest-mock-resources/compare/v1.3.2...v1.4.0) (2020-08-25)

### Features

* Allow globbing table names to select subsets of tables. 55a8aaf

- Allow globbing table names to select subsets of tables. 55a8aaf

### [v1.3.2](https://github.com/schireson/schireson-pytest-mock-resources/compare/v1.2.2...v1.3.2) (2020-05-28)

#### Features

* Add mysql support 4a79ca6
- Add mysql support 4a79ca6

#### Fixes

* Change user from 'user' to 'root' in mysql fixture method d1e193b

- Change user from 'user' to 'root' in mysql fixture method d1e193b

### [v1.2.2](https://github.com/schireson/schireson-pytest-mock-resources/compare/v1.2.1...v1.2.2) (2020-04-02)


### [v1.2.1](https://github.com/schireson/schireson-pytest-mock-resources/compare/v1.0.0...v1.2.1) (2020-03-26)


## v1.0.0 (2020-01-23)


2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ build-package:
poetry build

build-docs:
pip install -r docs/requirments.txt
pip install -r docs/requirements.txt
make -C docs html

build: build-package build-docs
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytest-mock-resources"
version = "2.1.7"
version = "2.1.8"
description = "A pytest plugin for easily instantiating reproducible mock resources."
authors = [
"Omar Khan <oakhan3@gmail.com>",
Expand Down
5 changes: 3 additions & 2 deletions src/pytest_mock_resources/container/mysql.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
import sqlalchemy
from pytest_mock_resources import compat

from pytest_mock_resources import compat
from pytest_mock_resources.config import DockerContainerConfig, fallback
from pytest_mock_resources.container.base import ContainerCheckFailed, get_container

Expand Down Expand Up @@ -32,6 +32,8 @@ class MysqlConfig(DockerContainerConfig):
"image": "mysql:5.6",
"port": 3406,
"ci_port": 3306,
# XXX: For now, username is disabled/ignored. We need root access for PMR
# internals.
"username": "root",
"password": "password",
"root_database": "dev",
Expand Down Expand Up @@ -96,7 +98,6 @@ def _mysql_container(pmr_mysql_config):
{3306: pmr_mysql_config.port},
{
"MYSQL_DATABASE": pmr_mysql_config.root_database,
"MYSQL_USER": pmr_mysql_config.username,
"MYSQL_ROOT_PASSWORD": pmr_mysql_config.password,
},
check_mysql_fn,
Expand Down

0 comments on commit 2561be4

Please sign in to comment.