Storage Configuration

Storage

The storage.yaml file describes a storage item for your tests.

Required Fields

AttributeTypeDescription
namestringUnique name of the storage, used for templating in tests.
uristringUnique Resource Identifier for the storage.

Optional Fields

AttributeTypeDescription
commandsarrayList of shell commands to run in the test environment before any test steps.
pathsmapNamed references to relative paths inside the storage.

Example

name: my_python_lib
commands: 
  - "apt update"
  - "apt install pip ipmitool inetutils-ping xvfb lsb-core -y"
  - "pip install robotframework"
paths:
  bin: bin/executable
  data: data
uri: fwci://my_python_lib

Commands

Commands are executed in the test environment before any test steps. Use them to install dependencies, configure the environment, or perform setup tasks.

Examples

  • Installing system packages:

    commands:
      - "apt update"
      - "apt install curl git -y"
  • Installing Python packages:

    commands:
      - "pip install requests pytest"
  • Setting environment variables:

    commands:
      - "export TEST_ENV=ci"

Referencing Paths in Tests

Define named paths in the paths map for easy reference in your test configuration. Use the template syntax [[storage.<storage_name>.<path_key>]] to refer to these paths.

Path Example

name: example
paths:
  bin: bin/executable
  data: data
  config: config/settings.yaml
uri: fwci://example
test:
  name: run_bin_executable
  steps:
    - name: Run executable from storage
      command: "[[storage.example]]/[[storage.example.bin]] --version"
    - name: Use data directory
      command: "ls [[storage.example]]/[[storage.example.data]]"
    - name: Show config file
      command: "cat [[storage.example]]/[[storage.example.config]]"

In this example, [[storage.example.bin]], [[storage.example.data]], and [[storage.example.config]] are replaced with the actual relative paths from your storage configuration.