Skip to content
Snippets Groups Projects
Commit 52d98761 authored by Frederic Danis's avatar Frederic Danis
Browse files

API: Update test to check encrypted bundles support


New version of apertis-update-manager expects offline updates to be
encrypted.
This commit adds a third parameter to get_static_delta() to allow to
retrieve encrypted static bundle.

Signed-off-by: default avatarFrédéric Danis <frederic.danis@collabora.com>
parent d0cca60e
No related branches found
No related tags found
1 merge request!14API: Update test to check encrypted bundles support
......@@ -53,7 +53,7 @@ phase_update_mount_detect()
{
sudo ostree admin status
local DELTAFILE=$(get_static_delta "")
local DELTAFILE=$(get_static_delta "" "" ".enc")
# Create a big enough image file
mkfs.ext4 /var/image_file 300000
......@@ -63,7 +63,7 @@ phase_update_mount_detect()
# Mount the image file and copy the update
mkdir /var/mn
mount $LOOPDEV /var/mn
cp $DELTAFILE /var/mn/static-update.bundle
cp $DELTAFILE /var/mn/static-update.bundle.enc
umount /var/mn
rmdir /var/mn
......
......@@ -50,11 +50,13 @@ get_static_delta()
local DELTAFILE=""
local SUFFIX="$1"
local SUBDIR=""
local ENCRYPTED=""
[ $# -gt 1 ] && SUBDIR="$2/"
[ $# -gt 2 ] && ENCRYPTED="$3"
#PLAYGROUND="/test/playground/fredo/build-ostree"
DELTAURL="${BASEURL}/${IMGPATH}/${IMGDATE}"
DELTAFILE="${IMGNAME}${SUFFIX}.delta"
DELTAFILE="${IMGNAME}${SUFFIX}.delta${ENCRYPTED}"
DELTAURL="${DELTAURL}/${ARCH}/${IMGTYPE}/${SUBDIR}${DELTAFILE}"
#wget --show-progress=off "${DELTAURL}" > /dev/null
......
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