canonical / data-integrator

Juju charm to provide DB access for apps outside of Juju.
https://charmhub.io/data-integrator
Apache License 2.0
3 stars 4 forks source link

Add integration tests with mysql-router(-k8s) <> data-integrator #14

Closed taurus-forever closed 2 months ago

taurus-forever commented 1 year ago

Issue:

There were no test for data-integrator <> mysql-router(-k8s) <> mysql-server(-k8s).

Solution:

The new test has been created.

taurus-forever commented 1 year ago

My local test results doesn't match GH runner results:

INFO     juju.model:model.py:2530 Waiting for model:
  mysql-k8s/0 [executing] active: Unit is ready: Mode: RW
  mysql-router-k8s/0 [executing] waiting: 
  mysql-test-app/0 [idle] waiting: 
INFO     juju.model:model.py:2530 Waiting for model:
  mysql-router-k8s/0 [idle] error: hook failed: "mysql-router-peers-relation-changed"
  mysql-test-app/0 [idle] waiting: 
INFO     juju.model:model.py:2530 Waiting for model:
  mysql-router-k8s/0 [idle] error: hook failed: "mysql-router-peers-relation-changed"
  mysql-test-app/0 [idle] waiting: 
INFO     juju.model:model.py:2530 Waiting for model:
  mysql-router-k8s/0 [idle] waiting: 
  mysql-test-app/0 [idle] waiting: 
paulomach commented 1 year ago

mysql-router VM needs to be bumped to jammy. Task DPE-1488

taurus-forever commented 1 year ago

data-integrator with mysql-router makes no sense due to the socket in databag:

ubuntu@taurus-dev:~$ juju run-action data-integrator/0 get-credentials --wait
unit-data-integrator-0:
  UnitId: data-integrator/0
  id: "17"
  results:
    mysql:
      database: teetete
      endpoints: file:///var/snap/charmed-mysql/common/run/mysqlrouter/mysql.sock
      password: wMBSU1NaVMiYfsqlcY3rCkbB
      read-only-endpoints: file:///var/snap/charmed-mysql/common/run/mysqlrouter/mysqlro.sock
      username: relation-14-15
    ok: "True"

@dragomirp can you please remind me, how does it work for pgbouncer?