Skip to content

Commit feffdab

Browse files
committed
test: update generate-update-metadata to apply the transfering
1 parent c6501ec commit feffdab

5 files changed

Lines changed: 23 additions & 29 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ jobs:
9999
- name: bootupctl generate-update-metadata
100100
run: |
101101
set -xeuo pipefail
102-
sudo podman run --rm -v $PWD:/run/src -w /run/src --privileged localhost/bootupd:latest tests/tests/move-content-to-usr.sh
102+
sudo podman run --rm -v $PWD:/run/src -w /run/src --privileged localhost/bootupd:latest tests/tests/generate-update-metadata.sh

src/component.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ pub(crate) fn component_updatedirname(component: &dyn Component) -> PathBuf {
112112

113113
/// Returns the path to the payload directory for an available update for
114114
/// a component.
115+
#[allow(dead_code)]
115116
#[cfg(any(
116117
target_arch = "x86_64",
117118
target_arch = "aarch64",

src/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub(crate) fn getenv_utf8(n: &str) -> Result<Option<String>> {
1919
}
2020
}
2121

22+
#[allow(dead_code)]
2223
pub(crate) fn filenames(dir: &openat::Dir) -> Result<HashSet<String>> {
2324
let mut ret = HashSet::new();
2425
for entry in dir.list_dir(".")? {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
set -xeuo pipefail
3+
4+
updates=/usr/lib/bootupd/updates
5+
rm -fv ${updates}/{BIOS,EFI}.json
6+
if [ -d "/usr/lib/efi" ]; then
7+
rm -rfv ${updates}/EFI
8+
else
9+
mv ${updates}/EFI /usr/lib/ostree-boot/efi
10+
fi
11+
# Run generate-update-metadata
12+
bootupctl backend generate-update-metadata -vvv
13+
cat ${updates}/EFI.json | jq
14+
15+
# Verify the bootupd EFI has more than one component installed
16+
version=$(cat ${updates}/EFI.json | jq -r .version | tr ',' ' ')
17+
array=($version)
18+
[ ${#array[*]} -gt 1 ]
19+
20+
[ $(cat ${updates}/EFI.json | jq '.versions | length') -gt 1 ]

tests/tests/move-content-to-usr.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)