From 32d44357598b2e73e8035a58a549e50d7b169bd4 Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pynkin@collabora.com>
Date: Wed, 18 Sep 2019 12:41:16 +0300
Subject: [PATCH] Add test case for offline signed update

New test case allows to check the initial configuration of repository
and ensure that AUM refuses to use unsigned commit and commit signed
with unknown signature.

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

diff --git a/test-cases/aum-offline-upgrade-signed.yaml b/test-cases/aum-offline-upgrade-signed.yaml
new file mode 100644
index 0000000..0be8d28
--- /dev/null
+++ b/test-cases/aum-offline-upgrade-signed.yaml
@@ -0,0 +1,34 @@
+metadata:
+  name: aum-offline-upgrade-signed
+  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: check signed offline upgrade test
+    This test ensures that the update manager uses static bundle with signed commit only."
+
+  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/v2020dev0
+
+run:
+  steps:
+    - "# Enter test directory:"
+    - cd aum-offline-upgrade
+    - "# Execute the following command:"
+    - common/run-test-in-systemd --timeout=900 --name=offline-upgrade env DEBUG=2 RELEASE=$RELEASE ARCH=$ARCH BASEURL=$BASEURL IMGPATH=$IMGPATH IMGDATE=$IMGDATE IMGTYPE=$IMGTYPE IMGNAME=$IMGNAME BOARD=$BOARD ./run-test-signature.sh
+
+parse:
+  pattern: ^(?P<test_case_id>[a-zA-Z0-9_\-\./]+):\s*(?P<result>pass|fail|skip|unknown)$
-- 
GitLab