metadata:
  name: tiny-container-system-folder-sharing
  format: "Apertis Test Definition 1.0"
  image-types:
    tiny-lxc: [ armhf-internal, arm64, amd64 ]
  image-deployment:
    - APT
  type: functional
  exec-type: automated
  priority: medium
  maintainer: "Apertis Project"
  description: "Test of folder sharing between host and Tiny system-wide
                privileged container started as user"

  expected:
    - "Test command should report \"pass\"."

install:
  git-repos:
    - url: https://gitlab.apertis.org/infrastructure/tiny-image-recipes.git
      branch: master

run:
  steps:
    - "# Enter test directory:"
    - cd tiny-image-recipes
    - "# Setup the AppArmor profile for container:"
    - sed s/__NAMESPACE_PLACEHOLDER__/lxc-apertis-tiny-system/g lxc/lxc-tiny-connectivity-profile-template | apparmor_parser -qr
    - "# Check that files created in a configured shared folder on the host can be read in the container and vice-versa:"
    - lavatests/test-folder-sharing -a "$ARCH" -r "$RELEASE" -d "$IMAGE_DATE" -t lxc/lxc-tiny-connectivity --aa-namespace "lxc-apertis-tiny-system"

parse:
  pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))"
