From 5c512ae30815d725fd265a50d34aa6d97c013b76 Mon Sep 17 00:00:00 2001 From: Faustin Lammler Date: Thu, 29 Sep 2022 11:25:37 +0200 Subject: [PATCH] Add 10.10 and remove mysql command For some reason, 10.3 MDBF version does not come with mariadb commands, thus disabling it. --- .github/workflows/molecule.yml | 29 ++++++++++++++------------ molecule/default/tests/test_default.py | 24 ++++++++++----------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 51e0f72..96ec0fe 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -60,26 +60,27 @@ jobs: playbook: - converge-mdbf.yml mariadb-version: - - 10.3 - - 10.4 - - 10.5 - - 10.6 - - 10.7 - - 10.8 - - 10.9 + - "10.3" + - "10.4" + - "10.5" + - "10.6" + - "10.7" + - "10.8" + - "10.9" + - "10.10" exclude: + - distro: ubuntu-18.04 + mariadb-version: 10.3 + - distro: ubuntu-20.04 + mariadb-version: 10.3 - distro: ubuntu-22.04 mariadb-version: 10.3 - distro: ubuntu-22.04 mariadb-version: 10.4 - distro: ubuntu-22.04 mariadb-version: 10.5 - # //TEMP remove below for next release - - distro: ubuntu-22.04 - mariadb-version: 10.6 - - distro: ubuntu-22.04 - mariadb-version: 10.7 - # //TEMP remove above for next release + - distro: debian-10 + mariadb-version: 10.3 - distro: debian-11 mariadb-version: 10.3 - distro: debian-11 @@ -98,6 +99,8 @@ jobs: mariadb-version: 10.8 - distro: debian-sid mariadb-version: 10.9 + - distro: debian-sid + mariadb-version: 10.10 steps: - uses: actions/checkout@v3 diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py index 8cc1289..acb3f8f 100644 --- a/molecule/default/tests/test_default.py +++ b/molecule/default/tests/test_default.py @@ -37,34 +37,34 @@ def test_ensure_custom_config_is_applied(host): def test_ensure_innodb_is_enabled(host): - assert host.run("mysql -Bse 'SHOW ENGINES' |\ + assert host.run("mariadb -Bse 'SHOW ENGINES' |\ grep -qE '^InnoDB.DEFAULT.*YES.YES.YES$'").rc == 0 def test_ensure_system_db_exist(host): - assert host.run("mysql -Bse 'SHOW DATABASES' |\ + assert host.run("mariadb -Bse 'SHOW DATABASES' |\ grep -q '^mysql$'").rc == 0 - assert host.run("mysql -Bse 'SHOW DATABASES' |\ + assert host.run("mariadb -Bse 'SHOW DATABASES' |\ grep -q '^information_schema$'").rc == 0 - assert host.run("mysql -Bse 'SHOW DATABASES' |\ + assert host.run("mariadb -Bse 'SHOW DATABASES' |\ grep -q '^performance_schema$'").rc == 0 def test_ensure_test_db_exist(host): - assert host.run("mysql -Bse 'SHOW DATABASES' |\ + assert host.run("mariadb -Bse 'SHOW DATABASES' |\ grep -q '^db1'").rc == 0 - assert host.run("mysql -Bse 'SHOW DATABASES' |\ + assert host.run("mariadb -Bse 'SHOW DATABASES' |\ grep -q '^db2'").rc == 0 def test_some_sql_queries(host): - assert host.run("mysql -e 'CREATE DATABASE db'").rc == 0 - assert host.run("mysql -e 'CREATE TABLE\ + assert host.run("mariadb -e 'CREATE DATABASE db'").rc == 0 + assert host.run("mariadb -e 'CREATE TABLE\ db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB;\ INSERT INTO db.t_innodb VALUES (1,\"foo\"),(2,\"bar\")'").rc == 0 - assert host.run("mysql -e 'CREATE FUNCTION db.f()\ + assert host.run("mariadb -e 'CREATE FUNCTION db.f()\ RETURNS INT DETERMINISTIC RETURN 1'").rc == 0 - assert host.run("mysql -e 'SHOW TABLES IN db'").rc == 0 - assert host.run("mysql -e 'SELECT * FROM db.t_innodb;\ + assert host.run("mariadb -e 'SHOW TABLES IN db'").rc == 0 + assert host.run("mariadb -e 'SELECT * FROM db.t_innodb;\ INSERT INTO db.t_innodb VALUES (3,\"foo\"),(4,\"bar\")'").rc == 0 - assert host.run("mysql -e 'SELECT db.f()'").rc == 0 + assert host.run("mariadb -e 'SELECT db.f()'").rc == 0