Skip to content

Commit

Permalink
Use apt-get to install mock
Browse files Browse the repository at this point in the history
  • Loading branch information
kanchansenlaskar authored and LiliDeng committed Mar 13, 2024
1 parent 01772e6 commit 5a8b8ed
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions microsoft/testsuites/vm_extensions/vmsnapshot_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
TestSuiteMetadata,
simple_requirement,
)
from lisa.operating_system import Debian
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator.azure.common import (
AzureNodeSchema,
Expand Down Expand Up @@ -144,10 +145,16 @@ def verify_exclude_disk_support_restore_point(
break

# installing all the required packages
# install python3 and pip
# install python3
python = node.tools[Python]
pip = node.tools[Pip]
pip.install_packages("mock")
if isinstance(node.os, Debian):
package_name = "python3-mock"
node.os.install_packages(package_name)
else:
# install pip
pip = node.tools[Pip]
pip.install_packages("mock")

# copy the file into the vm
self._copy_to_node(node, "handle.txt")
assert extension_dir, "Unable to find the extension directory."
Expand Down

0 comments on commit 5a8b8ed

Please sign in to comment.