From 81a98fb4407643c33f8556e08fcdffea3acfee77 Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pynkin@collabora.com>
Date: Sat, 18 Apr 2020 12:40:34 +0300
Subject: [PATCH] Add automatic test for OTA lack of disk space

Test OTA updates behavior with lack of disk space.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
---
 test-cases/aum-ota-out-of-space.yaml | 34 ++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 test-cases/aum-ota-out-of-space.yaml

diff --git a/test-cases/aum-ota-out-of-space.yaml b/test-cases/aum-ota-out-of-space.yaml
new file mode 100644
index 0000000..3027034
--- /dev/null
+++ b/test-cases/aum-ota-out-of-space.yaml
@@ -0,0 +1,34 @@
+metadata:
+  name: aum-ota-out-of-space
+  format: "Apertis Test Definition 1.0"
+  image-types:
+    minimal: [ armhf ]
+  image-deployment:
+    - OSTree
+  type: functional
+  exec-type: automated
+  priority: critical
+  maintainer: "Apertis Project"
+  description: "Apertis update manager: Out of space update test during OTA upgrade
+    This test ensures that the update manager behaves appropriately in low disk space conditions."
+
+  expected:
+    - "The automated test should succeed."
+
+  notes:
+    - "The automated update tests uses internet"
+
+install:
+  git-repos:
+    - url: https://gitlab.apertis.org/tests/aum-offline-upgrade.git
+      branch: apertis/v2021dev2
+
+run:
+  steps:
+    - "# Enter test directory:"
+    - cd aum-offline-upgrade
+    - "# Execute the following command:"
+    - common/run-test-in-systemd --timeout=900 --name=out-of-space env DEBUG=2 RELEASE=$RELEASE ARCH=$ARCH BASEURL=$BASEURL IMGPATH=$IMGPATH IMGDATE=$IMGDATE IMGTYPE=$IMGTYPE IMGNAME=$IMGNAME BOARD=$BOARD ./run-test-ota-out-of-space.sh
+
+parse:
+  pattern: ^(?P<test_case_id>[a-zA-Z0-9_\-\./]+):\s*(?P<result>pass|fail|skip|unknown)$
-- 
GitLab