mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-03 14:56:47 -04:00
tests: Un-redirect url after trying redirect
After the --redirect-url= test is finished it leaves the remote with a different url, which is confusing the other tests. In particular, at some point we remove the remote and add it back, which gets us back to the old url, but at that point the summary (from the newer url) has a later mtime than the old one so the old one keeps getting used. So, we unset the redirect and set back the old url. Also, the following test had to be tweaked for this change.
This commit is contained in:
committed by
Alexander Larsson
parent
07e6a2cf99
commit
7107f31986
@@ -443,12 +443,21 @@ update_repo test-gpg3 org.test.Collection.test
|
||||
${FLATPAK} ${U} install -y test-repo org.test.Hello
|
||||
assert_file_has_content $FL_DIR/app/org.test.Hello/$ARCH/master/active/files/bin/hello.sh UPDATED
|
||||
|
||||
# Switch back to the old url to unconfuse other tests
|
||||
UPDATE_REPO_ARGS="--redirect-url=" update_repo
|
||||
${FLATPAK} ${U} remote-modify --url="http://127.0.0.1:${port}/test" test-repo
|
||||
|
||||
# Also remove app so we can install the older one from the previous repo
|
||||
${FLATPAK} ${U} uninstall -y org.test.Hello
|
||||
|
||||
ok "redirect url and gpg key"
|
||||
|
||||
${FLATPAK} ${U} install -y -v test-repo org.test.Hello
|
||||
|
||||
# Test https://github.com/flatpak/flatpak/issues/3222
|
||||
mkdir -p $FL_DIR/repo/refs/mirrors/org.test.Collection.test/app/org.test.Hello/$ARCH/
|
||||
cp $FL_DIR/repo/refs/remotes/test-repo/app/org.test.Hello/$ARCH/master $FL_DIR/repo/refs/mirrors/org.test.Collection.test/app/org.test.Hello/$ARCH/
|
||||
make_updated_app test-gpg3 org.test.Collection.test master UPDATE2
|
||||
make_updated_app test org.test.Collection.test master UPDATE2
|
||||
${FLATPAK} ${U} update -y org.test.Hello
|
||||
assert_not_has_file $FL_DIR/repo/refs/mirrors/org.test.Collection.test/app/org.test.Hello/$ARCH/master
|
||||
assert_has_file $FL_DIR/repo/refs/remotes/test-repo/app/org.test.Hello/$ARCH/master
|
||||
|
||||
Reference in New Issue
Block a user