api tests passed
This commit is contained in:
parent
8c585e2e33
commit
0e80b08b0a
5 changed files with 515 additions and 20 deletions
|
|
@ -100,7 +100,7 @@ class EnvironmentManager:
|
|||
self.deb_mock.install_packages(packages)
|
||||
|
||||
# Get environment info
|
||||
info = self.get_environment_info(name)
|
||||
info = self.get_environment_info(name, arch, suite)
|
||||
self._active_environments[name] = info
|
||||
|
||||
return info
|
||||
|
|
@ -112,7 +112,7 @@ class EnvironmentManager:
|
|||
"""Check if an environment exists"""
|
||||
return self.deb_mock.chroot_manager.chroot_exists(name)
|
||||
|
||||
def get_environment_info(self, name: str) -> EnvironmentInfo:
|
||||
def get_environment_info(self, name: str, arch: str = None, suite: str = None) -> EnvironmentInfo:
|
||||
"""Get detailed information about an environment"""
|
||||
if not self.environment_exists(name):
|
||||
raise ValueError(f"Environment '{name}' does not exist")
|
||||
|
|
@ -128,8 +128,8 @@ class EnvironmentManager:
|
|||
|
||||
return EnvironmentInfo(
|
||||
name=name,
|
||||
architecture=self.config.architecture,
|
||||
suite=self.config.suite,
|
||||
architecture=arch or self.config.architecture,
|
||||
suite=suite or self.config.suite,
|
||||
status=chroot_info.get('status', 'unknown'),
|
||||
created=chroot_info.get('created'),
|
||||
modified=chroot_info.get('modified'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue