Skip to content

Commit 1eff6e6

Browse files
committed
tests/e2e-update: drop manifest_fork logic
I feel like this was a bit heavyweight for what we were gaining from it since we were only modifying one file. It just so happens also that the `git clone` was not including the git submodule that we're now using in FCOS for bootc. Let's just drop the "forking" and do something a bit more lightweight.
1 parent 5d5493d commit 1eff6e6

File tree

1 file changed

+5
-35
lines changed

1 file changed

+5
-35
lines changed

tests/e2e-update/e2e-update.sh

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -48,55 +48,25 @@ add_override() {
4848
(cd ${overrides}/rpm && runv koji download-build --arch=noarch --arch=$(arch) ${override})
4949
}
5050

51-
create_manifest_fork() {
52-
if test ! -f src/config/bootupd-fork; then
53-
echo "NOTICE: overriding src/config in ${COSA_DIR}"
54-
sleep 2
55-
runv rm -rf src/config.bootupd-testing-old
56-
runv mv src/config src/config.orig
57-
runv git clone src/config.orig src/config
58-
touch src/config/bootupd-fork
59-
# This will fall over if the upstream manifest gains `packages:`
60-
cat >> src/config/manifest.yaml << EOF
61-
packages:
62-
- test-bootupd-payload
63-
EOF
64-
echo "forked src/config"
65-
else
66-
fatal "already forked manifest"
67-
fi
68-
}
69-
70-
undo_manifest_fork() {
71-
test -d src/config.orig
72-
assert_file_has_content src/config/manifest.yaml test-bootupd-payload
73-
if test -f src/config/bootupd-fork; then
74-
runv rm src/config -rf
75-
else
76-
# Keep this around just in case
77-
runv mv src/config{,.bootupd-testing-old}
78-
fi
79-
runv mv src/config.orig src/config
80-
test ! -f src/config/bootupd-fork
81-
echo "undo src/config fork OK"
82-
}
83-
8451
if test -z "${e2e_skip_build:-}"; then
8552
echo "Building starting image"
8653
rm -f ${overrides}/rpm/*.rpm
8754
# Version from F42 prior to GA
8855
add_override grub2-2.12-26.fc42
8956
runv cosa build
9057
prev_image=$(runv cosa meta --image-path qemu)
91-
create_manifest_fork
58+
# Modify manifest to include `test-bootupd-payload` RPM
59+
runv git -C src/config checkout manifest.yaml # first make sure it's clean
60+
echo "packages: [test-bootupd-payload]" >> src/config/manifest.yaml
9261
rm -f ${overrides}/rpm/*.rpm
9362
echo "Building update ostree"
9463
# Latest (current) version in F42
9564
add_override grub2-2.12-28.fc42
9665
mv ${test_tmpdir}/yumrepo/packages/$(arch)/*.rpm ${overrides}/rpm/
9766
# Only build ostree update
9867
runv cosa build ostree
99-
undo_manifest_fork
68+
# Undo manifest modification
69+
runv git -C src/config checkout manifest.yaml
10070
fi
10171
echo "Preparing test"
10272
grubarch=

0 commit comments

Comments
 (0)