Fix create-user action and add functional test for the action
Update path handling for JUJU_REPOSITORY to match what charm-tools
do. Also rename the CHARM_BUILD_DIR global to avoid confusion as it
has diff. semantics as the charm-tools env var of the same name
1. add @when('grafana.admin_password.set') decorator to configure_sources.
This will ensure `configure_sources` always run after `check_adminuser` and
admin_password is either configured or generated.
2. change get_admin_password logic order: read from config first, fall back to kv if not set.
The unitdata.kv() grafana.admin_password value is created as a fallback when
admin_password is not set in the juju config. The original logic is opposite.
Simplify code by the way.
3. reuse get_admin_password in configure_sources
since the logic is the same now
1. add @when('grafana.admin_password.set') decorator to configure_sources.
This will ensure `configure_sources` always run after `check_adminuser` and
admin_password is either configured or generated.
2. change get_admin_password logic order: read from config first, fall back to kv if not set.
The unitdata.kv() grafana.admin_password value is created as a fallback when
admin_password is not set in the juju config. The original logic is opposite.
Simplify code by the way.
3. reuse get_admin_password in configure_sources
since the logic is the same now