Fix test failures

test-repo.sh was needlessly assuming that the application ID
is the first column in flatpak list -d output. Other tests
don't do the same. This is why test-repo.sh was broken by
the addition of the description column in list output.

Change the test to remove that assumption.

Closes: #2409
Approved by: alexlarsson
This commit is contained in:
Matthias Clasen
2018-12-09 08:53:30 -05:00
committed by Atomic Bot
parent f53ad59ccf
commit 27cf46d8ea

View File

@@ -137,7 +137,7 @@ ${FLATPAK} ${U} install -y test-repo org.test.Hllo >install-log
assert_file_has_content install-log "org.test.Hello"
${FLATPAK} ${U} list -d > list-log
assert_file_has_content list-log "^org.test.Hello"
assert_file_has_content list-log "org.test.Hello"
echo "ok typo correction works for install"
@@ -157,7 +157,7 @@ ${FLATPAK} ${U} install -y org.test.Hello |& tee install-log
assert_file_has_content install-log "org.test.Hello"
${FLATPAK} ${U} list -d > list-log
assert_file_has_content list-log "^org.test.Hello"
assert_file_has_content list-log "org.test.Hello"
${FLATPAK} ${U} remote-modify --enable test-missing-gpg-repo
${FLATPAK} ${U} remote-modify --enable test-wrong-gpg-repo
@@ -256,7 +256,7 @@ ${FLATPAK} ${U} info org.test.Hello > info-log
assert_file_has_content info-log "end-of-life: Reason2"
${FLATPAK} ${U} list -d > list-log
assert_file_has_content list-log "^org.test.Hello/.*eol=Reason2"
assert_file_has_content list-log "org.test.Hello/.*eol=Reason2"
${FLATPAK} ${U} uninstall -y org.test.Hello org.test.Platform
@@ -290,16 +290,16 @@ fi
${FLATPAK} uninstall -y org.test.Platform org.test.Hello
${FLATPAK} ${U} list -d > list-log
assert_not_file_has_content list-log "^org.test.Hello"
assert_not_file_has_content list-log "^org.test.Platform"
assert_not_file_has_content list-log "org.test.Hello"
assert_not_file_has_content list-log "org.test.Platform"
echo "ok uninstall vs installations"
${FLATPAK} ${U} install -y test-repo org.test.Hello
${FLATPAK} ${U} list -d > list-log
assert_file_has_content list-log "^org.test.Hello"
assert_file_has_content list-log "^org.test.Platform"
assert_file_has_content list-log "org.test.Hello"
assert_file_has_content list-log "org.test.Platform"
if ${FLATPAK} ${U} uninstall -y org.test.Platform; then
assert_not_reached "Should not be able to uninstall ${U} when there is a dependency installed"
@@ -309,8 +309,8 @@ ${FLATPAK} ${U} uninstall -y org.test.Hello
${FLATPAK} ${U} uninstall -y org.test.Platform
${FLATPAK} ${U} list -d > list-log
assert_not_file_has_content list-log "^org.test.Hello"
assert_not_file_has_content list-log "^org.test.Platform"
assert_not_file_has_content list-log "org.test.Hello"
assert_not_file_has_content list-log "org.test.Platform"
echo "ok uninstall dependencies"
@@ -332,8 +332,8 @@ echo "ok install and uninstall support 'NAME BRANCH' syntax"
${FLATPAK} ${U} install -y --no-deploy test-repo org.test.Hello
${FLATPAK} ${U} list -d > list-log
assert_not_file_has_content list-log "^org.test.Hello"
assert_not_file_has_content list-log "^org.test.Platform"
assert_not_file_has_content list-log "org.test.Hello"
assert_not_file_has_content list-log "org.test.Platform"
# Disable the remote to make sure we don't do i/o
port=$(cat httpd-port-main)
@@ -345,8 +345,8 @@ ${FLATPAK} ${U} install -y --no-pull test-repo org.test.Hello
${FLATPAK} ${U} remote-modify --url="http://127.0.0.1:${port}/test" test-repo
${FLATPAK} ${U} list -d > list-log
assert_file_has_content list-log "^org.test.Hello"
assert_file_has_content list-log "^org.test.Platform"
assert_file_has_content list-log "org.test.Hello"
assert_file_has_content list-log "org.test.Platform"
echo "ok install with --no-deploy and then --no-pull"
@@ -355,8 +355,8 @@ ${FLATPAK} ${U} uninstall -y org.test.Hello org.test.Platform
${FLATPAK} ${U} install -y --no-deploy test-repo hello
${FLATPAK} ${U} list -d > list-log
assert_not_file_has_content list-log "^org.test.Hello"
assert_not_file_has_content list-log "^org.test.Platform"
assert_not_file_has_content list-log "org.test.Hello"
assert_not_file_has_content list-log "org.test.Platform"
# Disable the remote to make sure we don't do i/o
port=$(cat httpd-port-main)
@@ -369,16 +369,16 @@ ${FLATPAK} ${U} install -y --no-pull test-repo hello
${FLATPAK} ${U} remote-modify --url="http://127.0.0.1:${port}/test" test-repo
${FLATPAK} ${U} list -d > list-log
assert_file_has_content list-log "^org.test.Hello"
assert_file_has_content list-log "^org.test.Platform"
assert_file_has_content list-log "org.test.Hello"
assert_file_has_content list-log "org.test.Platform"
echo "ok install with --no-deploy and then --no-pull works with typo correction"
${FLATPAK} uninstall -y --all
${FLATPAK} ${U} list -d > list-log
assert_not_file_has_content list-log "^org.test.Hello"
assert_not_file_has_content list-log "^org.test.Platform"
assert_not_file_has_content list-log "org.test.Hello"
assert_not_file_has_content list-log "org.test.Platform"
echo "ok uninstall --all"