From b923230e74e0c24742f12f280a502e264b89893f Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pynkin@collabora.com>
Date: Fri, 17 Apr 2020 14:55:21 +0300
Subject: [PATCH] Add automatic OTA updates test

Add automatic test of unattended network updates.

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

diff --git a/test-cases/aum-ota-auto.yaml b/test-cases/aum-ota-auto.yaml
new file mode 100644
index 0000000..50509bf
--- /dev/null
+++ b/test-cases/aum-ota-auto.yaml
@@ -0,0 +1,34 @@
+metadata:
+  name: aum-ota-auto
+  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: automatic OTA updates test
+    This test ensures that the update manager is able to work in unattended mode."
+
+  expected:
+    - "The automated test should succeed."
+
+  notes:
+    - "The automated test 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=api env DEBUG=2 RELEASE=$RELEASE ARCH=$ARCH BASEURL=$BASEURL IMGPATH=$IMGPATH IMGDATE=$IMGDATE IMGTYPE=$IMGTYPE IMGNAME=$IMGNAME BOARD=$BOARD ./run-test-ota-auto.sh
+
+parse:
+  pattern: ^(?P<test_case_id>[a-zA-Z0-9_\-\./]+):\s*(?P<result>pass|fail|skip|unknown)$
-- 
GitLab