Diff comments:

> diff --git a/systemtests/region.py b/systemtests/region.py
> index a6ef1bf..c17a6b2 100644
> --- a/systemtests/region.py
> +++ b/systemtests/region.py
> @@ -64,6 +66,27 @@ class MAASRegion:
>              ]
>          )
>  
> +    def login_user(self, user: str) -> None:

Right, currently we are not using the MAAS client in the same container as MAAS.
We have a the `authenticated_admin` fixture, it requires to have a 
credentials.yaml file, it should be written after the MAAS installation with 
the admin credentials. (see 
https://git.launchpad.net/~maas-committers/maas-ci/+git/system-tests/tree/systemtests/fixtures.py#n538
 )

> +        self.execute(
> +            [
> +                "maas",
> +                "login",
> +                user,
> +                f"{self.url}/api/2.0/",
> +                self.get_api_token(user),
> +            ]
> +        )
> +
> +    def get_version(self) -> str:
> +        if not self.user_exists(ADMIN_USER):
> +            self.create_user(ADMIN_USER, ADMIN_PASSWORD, ADMIN_EMAIL)
> +        self.login_user(ADMIN_USER)
> +        v_info = json.loads(
> +            self.execute(["maas", ADMIN_USER, "version", "read"]).stdout
> +        )
> +        LOG.info(v_info)
> +        return str(v_info.get("version", "0.0.0"))
> +
>      def get_proxy_settings(self, config: dict[str, Any]) -> dict[str, 
> Union[bool, str]]:
>          proxy_config = config.get("proxy", {})
>          http_proxy = proxy_config.get("http", "")


-- 
https://code.launchpad.net/~maas-committers/maas-ci/+git/system-tests/+merge/433880
Your team MAAS Committers is subscribed to branch 
~maas-committers/maas-ci/+git/system-tests:master.


-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to     : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp

Reply via email to