charm-juju-backup-all:add-some-unittests

Last commit made on 2022-08-29
Get this branch:
git clone -b add-some-unittests https://git.launchpad.net/charm-juju-backup-all
Members of Canonical BootStack Charmers can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
add-some-unittests
Repository:
lp:charm-juju-backup-all

Recent commits

89a0899... by Facundo Ciccioli

Disable DEBUG logging

6bec7d0... by Facundo Ciccioli

Make linter happy

faccc55... by Facundo Ciccioli

Make linter work again

7a26576... by Facundo Ciccioli

Complete perform_backup test and create update_crontab's

0b07b23... by Facundo Ciccioli

Fix the asyncio issue

Applying Robert Gildein's fix to the asyncio issue, his words:

I could reproduce this only on 3.8.10 Python, on 3.10.4 is not there.

To fix this you need to use model = mock.MagicMock() instead of
model = mock.Mock(). Why? Not sure, libjuju required

   websockets<8.0,>=7.0; python_version < "3.9"

and if I install version 10.3 the issue disappears.

IMO it's ok to ignore that issue.

4e195d3... by Facundo Ciccioli

[WIP] Add unit test for JujuBackupAllHelper.perform_backup()

NOTE: Tests as they are are failing due to some asyncio issue. Skipping
the test_perform_backup test makes them pass.

9640489... by Sudeep Bhandari

Specified architecture: amd64

Reviewed-on: https://code.launchpad.net/~sudeephb/charm-juju-backup-all/+git/charm-juju-backup-all/+merge/428532
Reviewed-by: Eric Chen <email address hidden>

e9880d9... by Sudeep Bhandari

explicitly specified arch: amd64

87ea3b5... by Sudeep Bhandari

Added Jammy support.
The charm built on focal didn't run on jammy(and vice versa), so two different charm files are created.

Unit tests log: https://pastebin.ubuntu.com/p/tkhMKnCFZ9/
Functional tests log: https://pastebin.ubuntu.com/p/Fwf9yXBmm2/
Note that the functional tests pass for jammy and focal, but fail for bionic. This failure is because of this bug: https://bugs.launchpad.net/charm-juju-backup-all/+bug/1986687

Reviewed-on: https://code.launchpad.net/~sudeephb/charm-juju-backup-all/+git/charm-juju-backup-all/+merge/428411
Reviewed-by: Eric Chen <email address hidden>

106a80f... by Sudeep Bhandari

Rename output charmsfiles differently