~bjornt/maas:pytest-django-setup

Last commit made on 2022-11-28
Get this branch:
git clone -b pytest-django-setup https://git.launchpad.net/~bjornt/maas
Only Björn Tillenius can upload to this branch. If you are Björn Tillenius please log in for upload directions.

Branch merges

Branch information

Name:
pytest-django-setup
Repository:
lp:~bjornt/maas

Recent commits

0aa7dcc... by Björn Tillenius

Add a pytest DB fixture to set up the database for the tests.

You now no longer have to run the pytest tests that require a DB using
bin/database. Instead you run bin/pytest and it will set up the DB
automatically. It still uses the bin/database infrastructure under the hood,
and it will re-use the DB by default. So the time it takes to run the tests is
the same as before.

For the performance tests, it's possible to pass in a DB dump to use as well.

I removed pytest-django, since we want to control how the DB is
created and cleaned up.

f458170... by Anton Troyanov

fix(vault): vmhost use get/set power_parameters

ffeb6a5... by Alberto Donato

print out indented perftest output to stdout

584af3c... by Igor Brovtsin

fix(vault): Clean Vault caches before fetching RPC shared secret

Otherwise, RPC secret will be fetched from the DB after migration to Vault
(until `regiond` process is restarted). Since there is no RPC secret in the DB
after migration, region will generate a new secret, preventing clients access.

8157fbd... by Peter Makowski

Update maas-ui to 3e926b4e0
fix: incorrect machine count on clear filter #4583 (#4588)

- use allMachineCount for no active filter

2f918ab... by Nick De Villiers

Update maas-ui to a5d0acd61
fix(vault): Hide additional notifications if a Vault error is displayed (#4586)

* fix(vault): Hide additional notifications if a Vault error is displayed

* Refactor: hideNotifications --> isNotificationListHidden

a3fc030... by Björn Tillenius

Add pytest CLI options for maasperf.

Now --perf-output-file and --perf-profiling-tag can be specified
when running pytest to control where the output timeing and profiling
data.

I also fixed conftest.py so that pytest can process it in --help.
It had global imports of maasserver, which doesn't work since
django isn't set up when --help runs.

I also made use of pytest_plugins rather than importing all the
fixtures explictly.

de9fbf0... by Igor Brovtsin

fix(vault): `migrate` command now creates `VaultSecret` metadata objects

e044bb8... by Nick De Villiers

Update maas-ui to 30a38eb63
feat(vault): render error message instead of content if vault is sealed (#4581)

Render an error message instead of full page content if an error message for vault is received.

7fd01d7... by Björn Tillenius

Remove the custom bin/test.perf runner.

There's no reason to have a custom test runner. It's better to
use pytest directly, so that it's clear how to use it.

I also improved the way we set the random seed, so that we do
it per-test and not per-session, and print out the used values
on test failures.

I kept bin/test.perf as a symlink, in case someone is very
used to it.