Skip to content
Snippets Groups Projects
Commit 3b9cc5e0 authored by Denis Pynkin's avatar Denis Pynkin Committed by Denis Pynkin
Browse files

Split check-tiny-*-container testcase


Split a single test case to several files per single test for
privileged and unprivileged containers.

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent 3cdb7248
No related branches found
No related tags found
No related merge requests found
metadata:
name: tiny-container-system-basic
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 Tiny system-wide privileged container using shared
networking with the host"
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 the basic functionality of container:"
- lavatests/check-tiny-containers -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))"
metadata: metadata:
name: check-tiny-system-container name: tiny-container-system-device-sharing
format: "Apertis Test Definition 1.0" format: "Apertis Test Definition 1.0"
image-types: image-types:
tiny-lxc: [ armhf-internal, arm64, amd64 ] tiny-lxc: [ armhf-internal, arm64, amd64 ]
...@@ -9,8 +9,8 @@ metadata: ...@@ -9,8 +9,8 @@ metadata:
exec-type: automated exec-type: automated
priority: medium priority: medium
maintainer: "Apertis Project" maintainer: "Apertis Project"
description: "Test of Tiny system-wide privileged container using shared description: "Test of device sharing between host and Tiny system-wide
networking with the host" privileged container"
expected: expected:
- "Test command should report \"pass\"." - "Test command should report \"pass\"."
...@@ -26,10 +26,6 @@ run: ...@@ -26,10 +26,6 @@ run:
- cd tiny-image-recipes - cd tiny-image-recipes
- "# Setup the AppArmor profile for container:" - "# Setup the AppArmor profile for container:"
- sed s/__NAMESPACE_PLACEHOLDER__/lxc-apertis-tiny-system/g lxc/lxc-tiny-connectivity-profile-template | apparmor_parser -qr - sed s/__NAMESPACE_PLACEHOLDER__/lxc-apertis-tiny-system/g lxc/lxc-tiny-connectivity-profile-template | apparmor_parser -qr
- "# Check the basic fnctionality of container:"
- lavatests/check-tiny-containers -a "$ARCH" -r "$RELEASE" -d "$IMAGE_DATE" -t lxc/lxc-tiny-connectivity --aa-namespace "lxc-apertis-tiny-system"
- "# 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"
- "# Ensure we have loop device:" - "# Ensure we have loop device:"
- modprobe loop - modprobe loop
- "# Create the random file and map it to loop0 device on host:" - "# Create the random file and map it to loop0 device on host:"
......
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))"
metadata:
name: tiny-container-user-basic
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 Tiny unprivileged container without any networking
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
- "# Ensure we allow user mapping:"
- sysctl -w kernel.unprivileged_userns_clone=1
- "# Setup the AppArmor profile for container:"
- sed s/__NAMESPACE_PLACEHOLDER__/lxc-apertis-tiny-userns/g lxc/lxc-tiny-connectivity-profile-template | apparmor_parser -qr
- "# Check the basic functionality of container:"
- sudo -u user -H lavatests/check-tiny-containers -a "$ARCH" -r "$RELEASE" -d "$IMAGE_DATE" -t lxc/lxc-tiny-connectivity --aa-namespace "lxc-apertis-tiny-userns"
parse:
pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))"
metadata: metadata:
name: check-tiny-user-container name: tiny-container-user-device-sharing
format: "Apertis Test Definition 1.0" format: "Apertis Test Definition 1.0"
image-types: image-types:
tiny-lxc: [ armhf-internal, arm64, amd64 ] tiny-lxc: [ armhf-internal, arm64, amd64 ]
...@@ -9,8 +9,8 @@ metadata: ...@@ -9,8 +9,8 @@ metadata:
exec-type: automated exec-type: automated
priority: medium priority: medium
maintainer: "Apertis Project" maintainer: "Apertis Project"
description: "Test of Tiny unprivileged container without any networking description: "Test of device sharing between host and Tiny unprivileged
started as user" container started as user"
expected: expected:
- "Test command should report \"pass\"." - "Test command should report \"pass\"."
...@@ -28,10 +28,6 @@ run: ...@@ -28,10 +28,6 @@ run:
- sysctl -w kernel.unprivileged_userns_clone=1 - sysctl -w kernel.unprivileged_userns_clone=1
- "# Setup the AppArmor profile for container:" - "# Setup the AppArmor profile for container:"
- sed s/__NAMESPACE_PLACEHOLDER__/lxc-apertis-tiny-userns/g lxc/lxc-tiny-connectivity-profile-template | apparmor_parser -qr - sed s/__NAMESPACE_PLACEHOLDER__/lxc-apertis-tiny-userns/g lxc/lxc-tiny-connectivity-profile-template | apparmor_parser -qr
- "# Check the basic fnctionality of container:"
- sudo -u user -H lavatests/check-tiny-containers -a "$ARCH" -r "$RELEASE" -d "$IMAGE_DATE" -t lxc/lxc-tiny-connectivity --aa-namespace "lxc-apertis-tiny-userns"
- "# Check that files created in a configured shared folder on the host can be read in the container and vice-versa:"
- sudo -u user -H lavatests/test-folder-sharing -a "$ARCH" -r "$RELEASE" -d "$IMAGE_DATE" -t lxc/lxc-tiny-connectivity --aa-namespace "lxc-apertis-tiny-userns"
- "# Ensure we have loop device:" - "# Ensure we have loop device:"
- modprobe loop - modprobe loop
- "# Create the random file and map it to loop0 device on host:" - "# Create the random file and map it to loop0 device on host:"
......
metadata:
name: tiny-container-user-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 unprivileged
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
- "# Ensure we allow user mapping:"
- sysctl -w kernel.unprivileged_userns_clone=1
- "# Setup the AppArmor profile for container:"
- sed s/__NAMESPACE_PLACEHOLDER__/lxc-apertis-tiny-userns/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:"
- sudo -u user -H lavatests/test-folder-sharing -a "$ARCH" -r "$RELEASE" -d "$IMAGE_DATE" -t lxc/lxc-tiny-connectivity --aa-namespace "lxc-apertis-tiny-userns"
parse:
pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment