Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ jobs:
env:
PYTEST_RETRIES: '3'
steps:
- name: Replace secrets in example config files
run: |
sed -i "s+MTL_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_MTL_PATH }}+" tests/validation/configs/test_config.yaml
sed -i "s/IP_ADDRESS_PLACEHOLDER/${{ secrets.BARE_METAL_IP_ADDRESS }}/" tests/validation/configs/topology_config.yaml
sed -i "s/SSH_PORT_PLACEHOLDER/${{ secrets.BARE_METAL_SSH_PORT }}/" tests/validation/configs/topology_config.yaml
sed -i "s/USERNAME_PLACEHOLDER/${{ secrets.BARE_METAL_USERNAME }}/" tests/validation/configs/topology_config.yaml
sed -i "s+KEY_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_SSH_KEY_PATH }}+" tests/validation/configs/topology_config.yaml
- name: 'preparation: Harden Runner'
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
Expand Down
4 changes: 2 additions & 2 deletions tests/validation/configs/test_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build: .
mtl_path: .
build: MTL_PATH_PLACEHOLDER
mtl_path: MTL_PATH_PLACEHOLDER
media_path: /mnt/media
capture_cfg:
enable: false
Expand Down
9 changes: 7 additions & 2 deletions tests/validation/configs/topology_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@ hosts:
- pci_device: 8086:1592
interface_index: 0 # all
connections:
- ip_address: 127.0.0.1
connection_type: LocalConnection
- ip_address: IP_ADDRESS_PLACEHOLDER
connection_type: SSHConnection
connection_options:
port: SSH_PORT_PLACEHOLDER
username: USERNAME_PLACEHOLDER
password: None
key_path: KEY_PATH_PLACEHOLDER
18 changes: 8 additions & 10 deletions tests/validation/mtl_engine/ramdisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ def __init__(self, host, mount_point, size_gib):
self._size_gib = size_gib

def mount(self):
cmd = f"mkdir -p {self._mount_point} && mount -t ramfs -o size={self._size_gib}G ramfs {self._mount_point}"
try:
self._host.connection.execute_command(cmd)
except ConnectionCalledProcessError as e:
logging.log(
level=logging.ERROR, msg=f"Failed to execute command {cmd}: {e}"
self._host.connection.execute_command(f"mkdir -p {self._mount_point}")
self._host.connection.execute_command(
f"mount -t ramfs -o size={self._size_gib}G ramfs {self._mount_point}"
)
except ConnectionCalledProcessError as e:
logging.log(level=logging.ERROR, msg=f"Failed to execute command: {e}")

def unmount(self):
cmd = f"umount {self._mount_point} && rmdir {self._mount_point}"
try:
self._host.connection.execute_command(cmd)
self._host.connection.execute_command(f"umount {self._mount_point}")
self._host.connection.execute_command(f"rmdir {self._mount_point}")
except ConnectionCalledProcessError as e:
logging.log(
level=logging.ERROR, msg=f"Failed to execute command {cmd}: {e}"
)
logging.log(level=logging.ERROR, msg=f"Failed to execute command: {e}")