You've already forked osfv-scripts
mirror of
https://github.com/Dasharo/osfv-scripts.git
synced 2026-03-06 14:55:02 -08:00
329c612ab4
Models class introduced, model data (*.yml) loading moved from RTE to Models. load_model_data() method modified to act as *.yml validator. list_models top-level command introduced to CLI. Signed-off-by: Mateusz Maciejewski <mateusz.maciejewski@3mdeb.com>
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
*** Settings ***
|
|
Documentation lib/models.py (Models class) test suite
|
|
|
|
Library OperatingSystem
|
|
Library Process
|
|
Library String
|
|
|
|
|
|
*** Test Cases ***
|
|
Correct model .yml
|
|
OperatingSystem.Copy File ./test/data/FakeDevice.yml ./src/osfv/models/
|
|
|
|
Run Process make install
|
|
|
|
${result}= Run Process osfv_cli list_models stdout=True
|
|
Log ${result.stdout}
|
|
|
|
${regex_result}= Get Lines Matching Pattern ${result.stdout} FakeDevice*VERIFIED
|
|
Log ${regex_result}
|
|
|
|
Should Not Be Empty ${regex_result}
|
|
OperatingSystem.Remove File ./src/osfv/models/FakeDevice.yml
|
|
|
|
Broken model .yml
|
|
OperatingSystem.Copy File ./test/data/FakeDeviceBroken.yml ./src/osfv/models/
|
|
|
|
Run Process make install
|
|
|
|
${result}= Run Process osfv_cli list_models stdout=True
|
|
Log ${result.stdout}
|
|
|
|
${regex_result}= Get Lines Matching Pattern ${result.stdout} FakeDeviceBroken*INCOMPLETE
|
|
Log ${regex_result}
|
|
|
|
Should Not Be Empty ${regex_result}
|
|
OperatingSystem.Remove File ./src/osfv/models/FakeDeviceBroken.yml
|