From ecc8fc562ea14cd6bf9bdf34651dc5a106aefef4 Mon Sep 17 00:00:00 2001 From: Castulo Martinez Date: Tue, 18 Sep 2018 16:16:18 -0700 Subject: [PATCH] Replacing old update and verify tests The old update and verify tests used the swupdlib.bash library that was replaced by testlib.bash. This commit replaces those old update and verify tests with new versions of the same tests that now use testlib. Signed-off-by: Castulo Martinez --- Makefile.am | 104 +++++++++--------- .../apply-full-file-delta/lines-checked | 16 --- .../target-dir/usr/lib/os-release | 1 - .../update/apply-full-file-delta/test.bats | 42 ------- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- ...93f430e81044a0fc03f81cba9eb89d3b7816ef3962 | 17 --- .../web-dir/100/Manifest.MoM | 8 -- .../web-dir/100/Manifest.os-core | 8 -- ...9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a | Bin 78 -> 0 bytes .../web-dir/version/formatstaging/latest | 1 - .../functional/update/boot-file/lines-checked | 16 --- .../target-dir/usr/lib/kernel/.gitignore | 4 - .../boot-file/target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 test/functional/update/boot-file/test.bats | 34 ------ .../update/boot-file/web-dir/10/Manifest.MoM | 8 -- .../boot-file/web-dir/10/Manifest.os-core | 14 --- .../update/boot-file/web-dir/100/Manifest.MoM | 8 -- .../boot-file/web-dir/100/Manifest.os-core | 15 --- ...bfdbdec784afef5a82ffa54e8c93bda3e0883360a3 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../functional/update/boot-skip/lines-checked | 17 --- .../target-dir/usr/lib/kernel/.gitignore | 4 - .../boot-skip/target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 test/functional/update/boot-skip/test.bats | 34 ------ .../update/boot-skip/web-dir/10/Manifest.MoM | 8 -- .../boot-skip/web-dir/10/Manifest.os-core | 14 --- .../update/boot-skip/web-dir/100/Manifest.MoM | 8 -- .../boot-skip/web-dir/100/Manifest.os-core | 15 --- ...bfdbdec784afef5a82ffa54e8c93bda3e0883360a3 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../delta-without-rename-flag/.gitignore | 1 - .../delta-without-rename-flag/lines-checked | 16 --- .../delta-without-rename-flag/test.bats | 41 ------- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 17 --- ...4a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 | 100 ----------------- ...f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 | 0 ...caf4e7f6c8384a26ac8aacd80ccde5a6bd3838e87f | 1 - ...fa6edde7b9fd64312b6be61f73429c39389e1d1334 | 99 ----------------- .../web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 19 ---- ...4a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 | Bin 64 -> 0 bytes ...7343bdc6bde1c19e4b5a782fd82c84a86b55de6d54 | Bin 84 -> 0 bytes ...9acce089110b12e62f52b057d57ccdd310f612779a | 1 - .../web-dir/version/formatstaging/latest | 1 - test/functional/update/download/lines-checked | 12 -- .../download/target-dir/usr/lib/os-release | 9 -- test/functional/update/download/test.bats | 34 ------ .../update/download/web-dir/10/Manifest.MoM | 8 -- .../download/web-dir/10/Manifest.os-core | 8 -- .../update/download/web-dir/100/Manifest.MoM | 8 -- .../download/web-dir/100/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../lines-checked | 16 --- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle2 | 0 .../usr/share/clear/bundles/test-bundle3 | 0 .../test.bats | 60 ---------- .../web-dir/10/Manifest.MoM | 11 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle1 | 9 -- .../web-dir/10/Manifest.test-bundle2 | 9 -- .../web-dir/10/Manifest.test-bundle3 | 9 -- ...4ed6ab6c6792aa6d4356c9c227342eaa0db015c152 | 1 - .../web-dir/20/Manifest.MoM | 11 -- .../web-dir/20/Manifest.os-core | 8 -- .../web-dir/30/Manifest.MoM | 11 -- .../web-dir/30/Manifest.os-core | 8 -- .../web-dir/30/Manifest.test-bundle2 | 10 -- .../web-dir/30/Manifest.test-bundle3 | 10 -- ...07ead83a55b478a950fefd2b1832b30046ce1c1550 | 1 - ...4ed6ab6c6792aa6d4356c9c227342eaa0db015c152 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../update/include-old-bundle/lines-checked | 16 --- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle1 | 0 .../update/include-old-bundle/test.bats | 56 ---------- .../web-dir/10/Manifest.MoM | 10 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle1 | 9 -- .../web-dir/10/Manifest.test-bundle2 | 9 -- ...54748df4717b4159513a3e0170ff5fa404dccc32e7 | 1 - .../web-dir/100/Manifest.MoM | 10 -- .../web-dir/100/Manifest.os-core | 8 -- .../web-dir/100/Manifest.test-bundle1 | 10 -- ...07ead83a55b478a950fefd2b1832b30046ce1c1550 | 1 - ...8372e62c4d1821c5e0106694365396d02c363ada50 | 1 - .../web-dir/version/formatstaging/latest | 1 - test/functional/update/include/lines-checked | 16 --- .../include/target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle1 | 0 test/functional/update/include/test.bats | 82 -------------- .../update/include/web-dir/10/Manifest.MoM | 10 -- .../include/web-dir/10/Manifest.os-core | 8 -- .../include/web-dir/10/Manifest.test-bundle1 | 9 -- .../include/web-dir/10/Manifest.test-bundle2 | 9 -- .../update/include/web-dir/100/Manifest.MoM | 15 --- .../include/web-dir/100/Manifest.os-core | 8 -- .../include/web-dir/100/Manifest.test-bundle1 | 10 -- .../include/web-dir/100/Manifest.test-bundle2 | 10 -- .../include/web-dir/100/Manifest.test-bundle3 | 11 -- .../include/web-dir/100/Manifest.test-bundle4 | 11 -- .../include/web-dir/100/Manifest.test-bundle5 | 10 -- .../include/web-dir/100/Manifest.test-bundle6 | 9 -- .../include/web-dir/100/Manifest.test-bundle7 | 9 -- ...a4fc1444881a5f2804650989996a44d223e0bfb105 | 1 - ...fa379dc2227edb7097f24a61f7ce5b3881e38a66a2 | 1 - ...1a9a23a5f697e9346714412b67c78729c5a7b6ae1f | 1 - .../.gitignore | 4 - ...fd02cffa36e4f1e5b430703b8fd26c086bf1059e72 | 1 - ...abdf7318074230ca1f980985032048b5b6ce193850 | 1 - ...36131fae747487ac93836429ada2a46f85b88af28f | 1 - ...e58f3b2f3852d7fbbb0fafbe04e41159d006501a88 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../update/missing-os-core/lines-checked | 16 --- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/test-bundle1 | 0 .../update/missing-os-core/test.bats | 42 ------- .../missing-os-core/web-dir/10/Manifest.MoM | 9 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle1 | 8 -- .../missing-os-core/web-dir/100/Manifest.MoM | 9 -- .../web-dir/100/Manifest.os-core | 8 -- .../web-dir/100/Manifest.test-bundle1 | 8 -- .../.gitignore | 4 - ...bfdbdec784afef5a82ffa54e8c93bda3e0883360a3 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../update/newest-deleted/lines-checked | 16 --- .../update/newest-deleted/target-dir/testfile | 1 - .../target-dir/usr/lib/os-release | 1 - .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle1 | 0 .../usr/share/clear/bundles/test-bundle2 | 0 .../update/newest-deleted/test.bats | 43 -------- .../newest-deleted/web-dir/10/Manifest.MoM | 9 -- .../web-dir/10/Manifest.os-core | 14 --- .../web-dir/10/Manifest.test-bundle1 | 9 -- .../newest-deleted/web-dir/20/Manifest.MoM | 10 -- .../web-dir/20/Manifest.os-core | 14 --- .../web-dir/20/Manifest.test-bundle2 | 9 -- .../newest-deleted/web-dir/30/Manifest.MoM | 10 -- .../web-dir/30/Manifest.os-core | 14 --- .../web-dir/30/Manifest.test-bundle2 | 9 -- ...3c3ef4d9099f36418ed5372d080a1bf0f03a49ab05 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../update/newest-ghosted/lines-checked | 16 --- .../update/newest-ghosted/target-dir/testfile | 1 - .../target-dir/usr/lib/os-release | 1 - .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle2 | 0 .../update/newest-ghosted/test.bats | 38 ------- .../newest-ghosted/web-dir/20/Manifest.MoM | 9 -- .../web-dir/20/Manifest.os-core | 14 --- .../web-dir/20/Manifest.test-bundle2 | 9 -- .../newest-ghosted/web-dir/30/Manifest.MoM | 9 -- .../web-dir/30/Manifest.os-core | 14 --- .../web-dir/30/Manifest.test-bundle2 | 9 -- ...3c3ef4d9099f36418ed5372d080a1bf0f03a49ab05 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../update/re-update-bad-os-release/format | 1 - .../re-update-bad-os-release/lines-checked | 17 --- .../target-dir/usr/lib/os-release | 9 -- .../update/re-update-bad-os-release/test.bats | 66 ----------- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 9 -- .../web-dir/100/Manifest.MoM | 8 -- .../web-dir/100/Manifest.os-core | 9 -- ...160fc57297b0779ce4cdeae1eae057bacb23618357 | 1 - .../.gitignore | 4 - .../web-dir/110/Manifest.MoM | 8 -- .../web-dir/110/Manifest.os-core | 9 -- ...160fc57297b0779ce4cdeae1eae057bacb23618357 | 1 - .../.gitignore | 4 - .../web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 9 -- ...160fc57297b0779ce4cdeae1eae057bacb23618357 | 1 - .../.gitignore | 4 - .../web-dir/version/format3/latest | 1 - .../web-dir/version/format4/latest | 1 - .../update/re-update-required/format | 1 - .../update/re-update-required/lines-checked | 32 ------ .../update/re-update-required/os-release | 9 -- .../target-dir/usr/lib/os-release | 9 -- .../update/re-update-required/test.bats | 77 ------------- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 10 -- .../web-dir/100/Manifest.MoM | 8 -- .../web-dir/100/Manifest.os-core | 10 -- ...160fc57297b0779ce4cdeae1eae057bacb23618357 | 1 - .../.gitignore | 4 - ...ea5ac2e97bace1e098b8c7f913db0f00e6b96c612e | 9 -- .../web-dir/110/Manifest.MoM | 8 -- .../web-dir/110/Manifest.os-core | 10 -- ...160fc57297b0779ce4cdeae1eae057bacb23618357 | 1 - .../.gitignore | 4 - ...ba0ee12dcda50aa566263a70b52518e5bc3ab6e3c4 | 9 -- .../web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 10 -- ...160fc57297b0779ce4cdeae1eae057bacb23618357 | 1 - .../.gitignore | 4 - ...ea5ac2e97bace1e098b8c7f913db0f00e6b96c612e | 9 -- .../web-dir/version/format3/latest | 1 - .../web-dir/version/format4/latest | 1 - .../update/rename-ghosted/lines-checked | 16 --- .../update/rename-ghosted/target-dir/bar | 100 ----------------- .../update/rename-ghosted/target-dir/bat | 99 ----------------- .../update/rename-ghosted/target-dir/baz | 99 ----------------- .../update/rename-ghosted/target-dir/foo | 100 ----------------- .../target-dir/usr/lib/os-release | 1 - .../usr/share/clear/bundles/os-core | 0 .../update/rename-ghosted/test.bats | 39 ------- .../rename-ghosted/web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 17 --- ...4a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 | 100 ----------------- ...f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 | 0 ...caf4e7f6c8384a26ac8aacd80ccde5a6bd3838e87f | 1 - ...fa6edde7b9fd64312b6be61f73429c39389e1d1334 | 99 ----------------- .../rename-ghosted/web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 19 ---- ...4a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 | Bin 64 -> 0 bytes ...7343bdc6bde1c19e4b5a782fd82c84a86b55de6d54 | Bin 84 -> 0 bytes ...9acce089110b12e62f52b057d57ccdd310f612779a | 1 - .../web-dir/version/formatstaging/latest | 1 - test/functional/update/rename/.gitignore | 1 - test/functional/update/rename/lines-checked | 16 --- test/functional/update/rename/test.bats | 40 ------- .../update/rename/web-dir/10/Manifest.MoM | 8 -- .../update/rename/web-dir/10/Manifest.os-core | 17 --- ...4a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 | 100 ----------------- ...f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 | 0 ...caf4e7f6c8384a26ac8aacd80ccde5a6bd3838e87f | 1 - ...fa6edde7b9fd64312b6be61f73429c39389e1d1334 | 99 ----------------- .../update/rename/web-dir/20/Manifest.MoM | 8 -- .../update/rename/web-dir/20/Manifest.os-core | 19 ---- ...4a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 | Bin 64 -> 0 bytes ...7343bdc6bde1c19e4b5a782fd82c84a86b55de6d54 | Bin 84 -> 0 bytes ...9acce089110b12e62f52b057d57ccdd310f612779a | 1 - .../web-dir/version/formatstaging/latest | 1 - .../update/skip-scripts/lines-checked | 17 --- .../target-dir/usr/lib/os-release | 9 -- test/functional/update/skip-scripts/test.bats | 37 ------- .../skip-scripts/web-dir/10/Manifest.MoM | 8 -- .../skip-scripts/web-dir/10/Manifest.os-core | 8 -- .../skip-scripts/web-dir/100/Manifest.MoM | 8 -- .../skip-scripts/web-dir/100/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../skip-verified-fullfiles/lines-checked | 13 --- .../skip-verified-fullfiles/target-dir/foo | 1 - .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle | 0 .../update/skip-verified-fullfiles/test.bats | 33 ------ .../web-dir/10/Manifest.MoM | 9 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle | 8 -- .../web-dir/100/Manifest.MoM | 9 -- .../web-dir/100/Manifest.test-bundle | 8 -- .../web-dir/version/formatstaging/latest | 1 - .../update/slow-server/lines-checked | 21 ---- .../slow-server/target-dir/usr/lib/os-release | 9 -- test/functional/update/slow-server/test.bats | 77 ------------- .../slow-server/web-dir/10/Manifest.MoM | 8 -- .../slow-server/web-dir/10/Manifest.os-core | 8 -- .../slow-server/web-dir/100/Manifest.MoM | 8 -- .../slow-server/web-dir/100/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - ...b241166c4c6d0665204977274093f74851380d49b5 | 1 - .../update/statedir-bad-hash/lines-checked | 16 --- .../target-dir/usr/lib/os-release | 9 -- .../update/statedir-bad-hash/test.bats | 45 -------- .../statedir-bad-hash/web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/100/Manifest.MoM | 8 -- .../web-dir/100/Manifest.os-core | 8 -- ...b241166c4c6d0665204977274093f74851380d49b5 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../status-no-server-content/lines-checked | 2 - .../target-dir/usr/lib/os-release | 9 -- .../update/status-no-server-content/test.bats | 12 -- .../web-dir/.gitignore | 4 - .../status-no-target-content/lines-checked | 2 - .../target-dir/.gitignore | 4 - .../update/status-no-target-content/test.bats | 12 -- .../web-dir/version/formatstaging/latest | 1 - .../status-version-double-quote/lines-checked | 2 - .../target-dir/usr/lib/os-release | 9 -- .../status-version-double-quote/test.bats | 12 -- .../web-dir/version/formatstaging/latest | 1 - .../status-version-single-quote/lines-checked | 2 - .../target-dir/usr/lib/os-release | 9 -- .../status-version-single-quote/test.bats | 12 -- .../web-dir/version/formatstaging/latest | 1 - test/functional/update/status/lines-checked | 2 - .../status/target-dir/usr/lib/os-release | 9 -- test/functional/update/status/test.bats | 12 -- .../web-dir/version/formatstaging/latest | 1 - .../update/update-apply-full-file-delta.bats | 43 ++++++++ test/functional/update/update-boot-file.bats | 41 +++++++ test/functional/update/update-boot-skip.bats | 42 +++++++ .../update-client-certificate.bats | 0 .../update-delta-without-rename-flag.bats | 42 +++++++ test/functional/update/update-download.bats | 37 +++++++ ...-include-old-bundle-with-tracked-file.bats | 54 +++++++++ .../update/update-include-old-bundle.bats | 49 +++++++++ test/functional/update/update-include.bats | 80 ++++++++++++++ .../update/update-missing-os-core.bats | 45 ++++++++ .../update/update-newest-deleted.bats | 49 +++++++++ .../update/update-newest-ghosted.bats | 40 +++++++ .../update-re-update-bad-os-release.bats | 47 ++++++++ .../update/update-re-update-required.bats | 59 ++++++++++ .../update/update-rename-ghosted.bats | 51 +++++++++ test/functional/update/update-rename.bats | 43 ++++++++ .../update/update-skip-scripts.bats | 43 ++++++++ .../update-skip-verified-fullfiles.bats | 48 ++++++++ .../functional/update/update-slow-server.bats | 101 +++++++++++++++++ .../update/update-statedir-bad-hash.bats | 47 ++++++++ .../update-status-no-server-content.bats | 23 ++++ .../update-status-no-target-content.bats | 24 ++++ .../update-status-version-double-quote.bats | 24 ++++ .../update-status-version-single-quote.bats | 24 ++++ test/functional/update/update-status.bats | 23 ++++ .../update/update-use-full-file.bats | 44 ++++++++ test/functional/update/update-use-pack.bats | 41 +++++++ .../update-verify-fix-path-hash-mismatch.bats | 53 +++++++++ .../update-verify-fix-path-missing-dir.bats | 50 +++++++++ .../update/update-verify-fullfile-hash.bats | 45 ++++++++ .../server.py => update_slow_server.py} | 4 +- .../update/use-full-file/lines-checked | 16 --- .../target-dir/usr/lib/os-release | 9 -- .../functional/update/use-full-file/test.bats | 34 ------ .../use-full-file/web-dir/10/Manifest.MoM | 8 -- .../use-full-file/web-dir/10/Manifest.os-core | 8 -- .../use-full-file/web-dir/100/Manifest.MoM | 8 -- .../web-dir/100/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - test/functional/update/use-pack/lines-checked | 16 --- .../use-pack/target-dir/usr/lib/os-release | 9 -- test/functional/update/use-pack/test.bats | 35 ------ .../update/use-pack/web-dir/10/Manifest.MoM | 8 -- .../use-pack/web-dir/10/Manifest.os-core | 8 -- .../update/use-pack/web-dir/100/Manifest.MoM | 8 -- .../use-pack/web-dir/100/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../lines-checked | 19 ---- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle | 0 .../verify-fix-path-hash-mismatch/test.bats | 42 ------- .../web-dir/10/Manifest.MoM | 9 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle | 9 -- .../.gitignore | 4 - .../web-dir/100/Manifest.MoM | 9 -- .../web-dir/100/Manifest.test-bundle | 9 -- ...a858b9c669245f82d3181a45cdfe793aac9dd1fb15 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../verify-fix-path-missing-dir/lines-checked | 18 --- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle | 0 .../verify-fix-path-missing-dir/test.bats | 47 -------- .../web-dir/10/Manifest.MoM | 9 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle | 9 -- .../.gitignore | 4 - .../web-dir/100/Manifest.MoM | 9 -- .../web-dir/100/Manifest.test-bundle | 9 -- ...a858b9c669245f82d3181a45cdfe793aac9dd1fb15 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../update/verify-fullfile-hash/lines-checked | 12 -- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle | 0 .../update/verify-fullfile-hash/test.bats | 35 ------ .../web-dir/10/Manifest.MoM | 9 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle | 8 -- .../web-dir/100/Manifest.MoM | 9 -- .../web-dir/100/Manifest.test-bundle | 8 -- ...a858b9c669245f82d3181a45cdfe793aac9dd1fb15 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../add-missing-directory/lines-checked | 14 --- .../target-dir/usr/lib/os-release | 9 -- .../verify/add-missing-directory/test.bats | 29 ----- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../add-missing-include-old/lines-checked | 18 --- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle1 | 0 .../verify/add-missing-include-old/test.bats | 48 -------- .../web-dir/10/Manifest.MoM | 10 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle1 | 9 -- .../web-dir/10/Manifest.test-bundle2 | 9 -- ...54748df4717b4159513a3e0170ff5fa404dccc32e7 | 1 - .../web-dir/100/Manifest.MoM | 10 -- .../web-dir/100/Manifest.os-core | 8 -- .../web-dir/100/Manifest.test-bundle1 | 10 -- ...07ead83a55b478a950fefd2b1832b30046ce1c1550 | 1 - ...8372e62c4d1821c5e0106694365396d02c363ada50 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../verify/add-missing-include/lines-checked | 18 --- .../target-dir/usr/lib/os-release | 9 -- .../usr/share/clear/bundles/os-core | 0 .../usr/share/clear/bundles/test-bundle1 | 0 .../verify/add-missing-include/test.bats | 41 ------- .../web-dir/10/Manifest.MoM | 10 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/10/Manifest.test-bundle1 | 10 -- .../web-dir/10/Manifest.test-bundle2 | 9 -- ...54748df4717b4159513a3e0170ff5fa404dccc32e7 | 1 - ...07ead83a55b478a950fefd2b1832b30046ce1c1550 | 1 - ...8372e62c4d1821c5e0106694365396d02c363ada50 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../verify/boot-file-deleted/lines-checked | 8 -- .../target-dir/usr/lib/kernel/testfile | 1 - .../target-dir/usr/lib/os-release | 9 -- .../verify/boot-file-deleted/test.bats | 31 ------ .../boot-file-deleted/web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- ...bfdbdec784afef5a82ffa54e8c93bda3e0883360a3 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../boot-file-mismatch-fix/lines-checked | 15 --- .../target-dir/usr/lib/kernel/testfile | 1 - .../target-dir/usr/lib/kernel/testfile.backup | 1 - .../target-dir/usr/lib/os-release | 9 -- .../verify/boot-file-mismatch-fix/test.bats | 31 ------ .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- ...bfdbdec784afef5a82ffa54e8c93bda3e0883360a3 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../verify/boot-file-mismatch/lines-checked | 6 - .../target-dir/usr/lib/kernel/testfile | 1 - .../target-dir/usr/lib/os-release | 9 -- .../verify/boot-file-mismatch/test.bats | 25 ----- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/version/formatstaging/latest | 1 - .../functional/verify/boot-skip/lines-checked | 9 -- .../target-dir/usr/lib/kernel/testfile | 1 - .../boot-skip/target-dir/usr/lib/os-release | 9 -- test/functional/verify/boot-skip/test.bats | 32 ------ .../verify/boot-skip/web-dir/10/Manifest.MoM | 8 -- .../boot-skip/web-dir/10/Manifest.os-core | 8 -- ...bfdbdec784afef5a82ffa54e8c93bda3e0883360a3 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../check-missing-directory/lines-checked | 6 - .../target-dir/usr/lib/os-release | 9 -- .../verify/check-missing-directory/test.bats | 23 ---- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/version/formatstaging/latest | 1 - .../directory-tree-deleted/lines-checked | 13 --- .../target-dir/testdir1/testdir2/testfile | 0 .../target-dir/usr/lib/os-release | 9 -- .../verify/directory-tree-deleted/test.bats | 27 ----- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 10 -- .../web-dir/version/formatstaging/latest | 1 - .../verify/empty-dir-deleted/lines-checked | 11 -- .../target-dir/testdir/.gitignore | 0 .../target-dir/usr/lib/os-release | 9 -- .../verify/empty-dir-deleted/test.bats | 26 ----- .../empty-dir-deleted/web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../web-dir/version/formatstaging/latest | 1 - .../lines-checked | 15 --- .../target-dir/usr/lib/os-release | 1 - .../fix-version-mismatch-override/test.bats | 42 ------- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../verify/fix-version-mismatch/lines-checked | 3 - .../target-dir/usr/lib/os-release | 1 - .../verify/fix-version-mismatch/test.bats | 37 ------- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../format-mismatch-override/lines-checked | 16 --- .../target-dir/usr/lib/os-release | 1 - .../verify/format-mismatch-override/test.bats | 43 -------- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/format1/latest | 1 - .../web-dir/version/format2/latest | 1 - .../verify/format-mismatch/lines-checked | 4 - .../target-dir/usr/lib/os-release | 1 - .../verify/format-mismatch/test.bats | 42 ------- .../format-mismatch/web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../.gitignore | 4 - .../format-mismatch/web-dir/20/Manifest.MoM | 8 -- .../web-dir/20/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/format1/latest | 1 - .../web-dir/version/format2/latest | 1 - test/functional/verify/ghosted/lines-checked | 8 -- .../verify/ghosted/target-dir.bak/foo | 5 - test/functional/verify/ghosted/target-dir/foo | 5 - .../ghosted/target-dir/usr/lib/os-release | 9 -- test/functional/verify/ghosted/test.bats | 30 ----- .../verify/ghosted/web-dir/10/Manifest.MoM | 8 -- .../ghosted/web-dir/10/Manifest.os-core | 8 -- .../web-dir/version/formatstaging/latest | 1 - .../verify/install-directory/lines-checked | 11 -- .../target-dir/usr/lib/os-release | 9 -- .../verify/install-directory/test.bats | 29 ----- .../install-directory/web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../install-latest-directory/lines-checked | 11 -- .../target-dir/usr/lib/os-release | 9 -- .../verify/install-latest-directory/test.bats | 29 ----- .../web-dir/100/Manifest.MoM | 8 -- .../web-dir/100/Manifest.os-core | 8 -- .../.gitignore | 4 - .../web-dir/version/formatstaging/latest | 1 - .../verify/latest-missing/lines-checked | 2 - .../target-dir/usr/lib/os-release | 9 -- .../verify/latest-missing/test.bats | 11 -- .../picky-ghosted-missing/lines-checked | 9 -- .../target-dir.bak/usr/lib/os-release | 9 -- .../target-dir/usr/lib/os-release | 9 -- .../verify/picky-ghosted-missing/test.bats | 29 ----- .../web-dir/10/Manifest.MoM | 8 -- .../web-dir/10/Manifest.os-core | 11 -- ...9ed90d086d0d5967127086f223a4a514c7c468ed19 | 5 - .../web-dir/version/formatstaging/latest | 1 - .../verify/picky-ghosted/lines-checked | 9 -- .../picky-ghosted/target-dir.bak/usr/foo | 5 - .../target-dir.bak/usr/lib/os-release | 9 -- .../verify/picky-ghosted/target-dir/usr/foo | 5 - .../target-dir/usr/lib/os-release | 9 -- .../functional/verify/picky-ghosted/test.bats | 30 ----- .../picky-ghosted/web-dir/10/Manifest.MoM | 8 -- .../picky-ghosted/web-dir/10/Manifest.os-core | 11 -- .../web-dir/version/formatstaging/latest | 1 - .../verify/skip-scripts/lines-checked | 9 -- .../target-dir/usr/lib/os-release | 9 -- .../skip-scripts/target-dir/usr/lib/testfile | 1 - test/functional/verify/skip-scripts/test.bats | 33 ------ .../skip-scripts/web-dir/10/Manifest.MoM | 8 -- .../skip-scripts/web-dir/10/Manifest.os-core | 8 -- ...bfdbdec784afef5a82ffa54e8c93bda3e0883360a3 | 1 - .../web-dir/version/formatstaging/latest | 1 - .../verify/verify-add-missing-directory.bats | 39 +++++++ .../verify-add-missing-include-old.bats | 46 ++++++++ .../verify/verify-add-missing-include.bats | 47 ++++++++ .../verify/verify-boot-file-deleted.bats | 33 ++++++ .../verify/verify-boot-file-mismatch-fix.bats | 40 +++++++ .../verify/verify-boot-file-mismatch.bats | 30 +++++ test/functional/verify/verify-boot-skip.bats | 35 ++++++ .../verify-check-missing-directory.bats | 31 ++++++ .../verify-client-certificate.bats | 0 .../verify/verify-directory-tree-deleted.bats | 45 ++++++++ .../verify/verify-empty-dir-deleted.bats | 36 ++++++ .../verify-fix-version-mismatch-override.bats | 42 +++++++ .../verify/verify-fix-version-mismatch.bats | 26 +++++ .../verify-format-mismatch-override.bats | 48 ++++++++ .../verify/verify-format-mismatch.bats | 26 +++++ test/functional/verify/verify-ghosted.bats | 34 ++++++ .../verify/verify-install-directory.bats | 38 +++++++ .../verify-install-latest-directory.bats | 38 +++++++ .../verify/verify-latest-missing.bats | 33 ++++++ .../verify/verify-picky-ghosted-missing.bats | 37 +++++++ .../verify/verify-picky-ghosted.bats | 36 ++++++ .../verify/verify-skip-scripts.bats | 36 ++++++ 592 files changed, 2142 insertions(+), 5942 deletions(-) delete mode 100644 test/functional/update/apply-full-file-delta/lines-checked delete mode 100644 test/functional/update/apply-full-file-delta/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/apply-full-file-delta/test.bats delete mode 100644 test/functional/update/apply-full-file-delta/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/apply-full-file-delta/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/apply-full-file-delta/web-dir/10/staged/0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962 delete mode 100644 test/functional/update/apply-full-file-delta/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/apply-full-file-delta/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/apply-full-file-delta/web-dir/100/delta/10-100-0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962-9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a delete mode 100644 test/functional/update/apply-full-file-delta/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/boot-file/lines-checked delete mode 100644 test/functional/update/boot-file/target-dir/usr/lib/kernel/.gitignore delete mode 100644 test/functional/update/boot-file/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/boot-file/target-dir/usr/share/clear/bundles/os-core delete mode 100755 test/functional/update/boot-file/test.bats delete mode 100644 test/functional/update/boot-file/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/boot-file/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/boot-file/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/boot-file/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/boot-file/web-dir/100/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 delete mode 100644 test/functional/update/boot-file/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/boot-skip/lines-checked delete mode 100644 test/functional/update/boot-skip/target-dir/usr/lib/kernel/.gitignore delete mode 100644 test/functional/update/boot-skip/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/boot-skip/target-dir/usr/share/clear/bundles/os-core delete mode 100755 test/functional/update/boot-skip/test.bats delete mode 100644 test/functional/update/boot-skip/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/boot-skip/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/boot-skip/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/boot-skip/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/boot-skip/web-dir/100/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 delete mode 100644 test/functional/update/boot-skip/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/delta-without-rename-flag/.gitignore delete mode 100644 test/functional/update/delta-without-rename-flag/lines-checked delete mode 100755 test/functional/update/delta-without-rename-flag/test.bats delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/10/staged/0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/10/staged/28cb7c6cad23920f344157f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/10/staged/e6b5b316f2b470fc5d7a22caf4e7f6c8384a26ac8aacd80ccde5a6bd3838e87f delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/10/staged/fdfec2695a18d214f80ef9fa6edde7b9fd64312b6be61f73429c39389e1d1334 delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/20/delta/10-20-0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50-0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/20/delta/10-20-fdfec2695a18d214f80ef9fa6edde7b9fd64312b6be61f73429c39389e1d1334-c21cc55db744a24867470b7343bdc6bde1c19e4b5a782fd82c84a86b55de6d54 delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/20/staged/43fff5857537e90559eebe9acce089110b12e62f52b057d57ccdd310f612779a delete mode 100644 test/functional/update/delta-without-rename-flag/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/download/lines-checked delete mode 100644 test/functional/update/download/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/download/test.bats delete mode 100644 test/functional/update/download/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/download/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/download/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/download/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/download/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/download/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/lines-checked delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/target-dir/usr/share/clear/bundles/test-bundle2 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/target-dir/usr/share/clear/bundles/test-bundle3 delete mode 100755 test/functional/update/include-old-bundle-with-tracked-file/test.bats delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/10/Manifest.test-bundle1 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/10/Manifest.test-bundle2 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/10/Manifest.test-bundle3 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/10/files/e324302d81e79a935137bd4ed6ab6c6792aa6d4356c9c227342eaa0db015c152 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/30/Manifest.MoM delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/30/Manifest.os-core delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/30/Manifest.test-bundle2 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/30/Manifest.test-bundle3 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/30/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/30/files/e324302d81e79a935137bd4ed6ab6c6792aa6d4356c9c227342eaa0db015c152 delete mode 100644 test/functional/update/include-old-bundle-with-tracked-file/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/include-old-bundle/lines-checked delete mode 100644 test/functional/update/include-old-bundle/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/include-old-bundle/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/include-old-bundle/target-dir/usr/share/clear/bundles/test-bundle1 delete mode 100755 test/functional/update/include-old-bundle/test.bats delete mode 100644 test/functional/update/include-old-bundle/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/include-old-bundle/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/include-old-bundle/web-dir/10/Manifest.test-bundle1 delete mode 100644 test/functional/update/include-old-bundle/web-dir/10/Manifest.test-bundle2 delete mode 100644 test/functional/update/include-old-bundle/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 delete mode 100644 test/functional/update/include-old-bundle/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/include-old-bundle/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/include-old-bundle/web-dir/100/Manifest.test-bundle1 delete mode 100644 test/functional/update/include-old-bundle/web-dir/100/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 delete mode 100644 test/functional/update/include-old-bundle/web-dir/100/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 delete mode 100644 test/functional/update/include-old-bundle/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/include/lines-checked delete mode 100644 test/functional/update/include/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/include/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/include/target-dir/usr/share/clear/bundles/test-bundle1 delete mode 100755 test/functional/update/include/test.bats delete mode 100644 test/functional/update/include/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/include/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/include/web-dir/10/Manifest.test-bundle1 delete mode 100644 test/functional/update/include/web-dir/10/Manifest.test-bundle2 delete mode 100644 test/functional/update/include/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/include/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/include/web-dir/100/Manifest.test-bundle1 delete mode 100644 test/functional/update/include/web-dir/100/Manifest.test-bundle2 delete mode 100644 test/functional/update/include/web-dir/100/Manifest.test-bundle3 delete mode 100644 test/functional/update/include/web-dir/100/Manifest.test-bundle4 delete mode 100644 test/functional/update/include/web-dir/100/Manifest.test-bundle5 delete mode 100644 test/functional/update/include/web-dir/100/Manifest.test-bundle6 delete mode 100644 test/functional/update/include/web-dir/100/Manifest.test-bundle7 delete mode 100644 test/functional/update/include/web-dir/100/files/01fe90f246616cc07c216fa4fc1444881a5f2804650989996a44d223e0bfb105 delete mode 100644 test/functional/update/include/web-dir/100/files/4185aaf172a7f8b0cffb79fa379dc2227edb7097f24a61f7ce5b3881e38a66a2 delete mode 100644 test/functional/update/include/web-dir/100/files/5f79d142c1859a3d82e9391a9a23a5f697e9346714412b67c78729c5a7b6ae1f delete mode 100644 test/functional/update/include/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/include/web-dir/100/files/9a94d945b3841b70df7117fd02cffa36e4f1e5b430703b8fd26c086bf1059e72 delete mode 100644 test/functional/update/include/web-dir/100/files/a325dc221e0e03802b5a81abdf7318074230ca1f980985032048b5b6ce193850 delete mode 100644 test/functional/update/include/web-dir/100/files/d1f70150c56e960ca18bd636131fae747487ac93836429ada2a46f85b88af28f delete mode 100644 test/functional/update/include/web-dir/100/files/e2c7d7bb180e8b44ce0fb4e58f3b2f3852d7fbbb0fafbe04e41159d006501a88 delete mode 100644 test/functional/update/include/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/missing-os-core/lines-checked delete mode 100644 test/functional/update/missing-os-core/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/missing-os-core/target-dir/usr/share/clear/bundles/test-bundle1 delete mode 100755 test/functional/update/missing-os-core/test.bats delete mode 100644 test/functional/update/missing-os-core/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/missing-os-core/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/missing-os-core/web-dir/10/Manifest.test-bundle1 delete mode 100644 test/functional/update/missing-os-core/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/missing-os-core/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/missing-os-core/web-dir/100/Manifest.test-bundle1 delete mode 100644 test/functional/update/missing-os-core/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/missing-os-core/web-dir/100/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 delete mode 100644 test/functional/update/missing-os-core/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/newest-deleted/lines-checked delete mode 100644 test/functional/update/newest-deleted/target-dir/testfile delete mode 100644 test/functional/update/newest-deleted/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/newest-deleted/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/newest-deleted/target-dir/usr/share/clear/bundles/test-bundle1 delete mode 100644 test/functional/update/newest-deleted/target-dir/usr/share/clear/bundles/test-bundle2 delete mode 100755 test/functional/update/newest-deleted/test.bats delete mode 100644 test/functional/update/newest-deleted/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/newest-deleted/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/newest-deleted/web-dir/10/Manifest.test-bundle1 delete mode 100644 test/functional/update/newest-deleted/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/newest-deleted/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/newest-deleted/web-dir/20/Manifest.test-bundle2 delete mode 100644 test/functional/update/newest-deleted/web-dir/30/Manifest.MoM delete mode 100644 test/functional/update/newest-deleted/web-dir/30/Manifest.os-core delete mode 100644 test/functional/update/newest-deleted/web-dir/30/Manifest.test-bundle2 delete mode 100644 test/functional/update/newest-deleted/web-dir/30/staged/1c1efd10467cbc1dddd8e63c3ef4d9099f36418ed5372d080a1bf0f03a49ab05 delete mode 100644 test/functional/update/newest-deleted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/newest-ghosted/lines-checked delete mode 100644 test/functional/update/newest-ghosted/target-dir/testfile delete mode 100644 test/functional/update/newest-ghosted/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/newest-ghosted/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/newest-ghosted/target-dir/usr/share/clear/bundles/test-bundle2 delete mode 100755 test/functional/update/newest-ghosted/test.bats delete mode 100644 test/functional/update/newest-ghosted/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/newest-ghosted/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/newest-ghosted/web-dir/20/Manifest.test-bundle2 delete mode 100644 test/functional/update/newest-ghosted/web-dir/30/Manifest.MoM delete mode 100644 test/functional/update/newest-ghosted/web-dir/30/Manifest.os-core delete mode 100644 test/functional/update/newest-ghosted/web-dir/30/Manifest.test-bundle2 delete mode 100644 test/functional/update/newest-ghosted/web-dir/30/staged/1c1efd10467cbc1dddd8e63c3ef4d9099f36418ed5372d080a1bf0f03a49ab05 delete mode 100644 test/functional/update/newest-ghosted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/re-update-bad-os-release/format delete mode 100644 test/functional/update/re-update-bad-os-release/lines-checked delete mode 100644 test/functional/update/re-update-bad-os-release/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/re-update-bad-os-release/test.bats delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/100/files/512b7187c47b9c8166b61b160fc57297b0779ce4cdeae1eae057bacb23618357 delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/110/Manifest.MoM delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/110/Manifest.os-core delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/110/files/512b7187c47b9c8166b61b160fc57297b0779ce4cdeae1eae057bacb23618357 delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/110/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/20/files/512b7187c47b9c8166b61b160fc57297b0779ce4cdeae1eae057bacb23618357 delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/version/format3/latest delete mode 100644 test/functional/update/re-update-bad-os-release/web-dir/version/format4/latest delete mode 100644 test/functional/update/re-update-required/format delete mode 100644 test/functional/update/re-update-required/lines-checked delete mode 100644 test/functional/update/re-update-required/os-release delete mode 100644 test/functional/update/re-update-required/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/re-update-required/test.bats delete mode 100644 test/functional/update/re-update-required/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/re-update-required/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/re-update-required/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/re-update-required/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/re-update-required/web-dir/100/files/512b7187c47b9c8166b61b160fc57297b0779ce4cdeae1eae057bacb23618357 delete mode 100644 test/functional/update/re-update-required/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/re-update-required/web-dir/100/files/938b2569476c3cf665afa9ea5ac2e97bace1e098b8c7f913db0f00e6b96c612e delete mode 100644 test/functional/update/re-update-required/web-dir/110/Manifest.MoM delete mode 100644 test/functional/update/re-update-required/web-dir/110/Manifest.os-core delete mode 100644 test/functional/update/re-update-required/web-dir/110/files/512b7187c47b9c8166b61b160fc57297b0779ce4cdeae1eae057bacb23618357 delete mode 100644 test/functional/update/re-update-required/web-dir/110/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/re-update-required/web-dir/110/files/82dd2d70ab95d9500469b4ba0ee12dcda50aa566263a70b52518e5bc3ab6e3c4 delete mode 100644 test/functional/update/re-update-required/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/re-update-required/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/re-update-required/web-dir/20/files/512b7187c47b9c8166b61b160fc57297b0779ce4cdeae1eae057bacb23618357 delete mode 100644 test/functional/update/re-update-required/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/re-update-required/web-dir/20/files/938b2569476c3cf665afa9ea5ac2e97bace1e098b8c7f913db0f00e6b96c612e delete mode 100644 test/functional/update/re-update-required/web-dir/version/format3/latest delete mode 100644 test/functional/update/re-update-required/web-dir/version/format4/latest delete mode 100644 test/functional/update/rename-ghosted/lines-checked delete mode 100644 test/functional/update/rename-ghosted/target-dir/bar delete mode 100644 test/functional/update/rename-ghosted/target-dir/bat delete mode 100644 test/functional/update/rename-ghosted/target-dir/baz delete mode 100644 test/functional/update/rename-ghosted/target-dir/foo delete mode 100644 test/functional/update/rename-ghosted/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/rename-ghosted/target-dir/usr/share/clear/bundles/os-core delete mode 100755 test/functional/update/rename-ghosted/test.bats delete mode 100644 test/functional/update/rename-ghosted/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/rename-ghosted/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/rename-ghosted/web-dir/10/staged/0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 delete mode 100644 test/functional/update/rename-ghosted/web-dir/10/staged/28cb7c6cad23920f344157f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 delete mode 100644 test/functional/update/rename-ghosted/web-dir/10/staged/e6b5b316f2b470fc5d7a22caf4e7f6c8384a26ac8aacd80ccde5a6bd3838e87f delete mode 100644 test/functional/update/rename-ghosted/web-dir/10/staged/fdfec2695a18d214f80ef9fa6edde7b9fd64312b6be61f73429c39389e1d1334 delete mode 100644 test/functional/update/rename-ghosted/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/rename-ghosted/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/rename-ghosted/web-dir/20/delta/10-20-0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50-0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 delete mode 100644 test/functional/update/rename-ghosted/web-dir/20/delta/10-20-fdfec2695a18d214f80ef9fa6edde7b9fd64312b6be61f73429c39389e1d1334-c21cc55db744a24867470b7343bdc6bde1c19e4b5a782fd82c84a86b55de6d54 delete mode 100644 test/functional/update/rename-ghosted/web-dir/20/staged/43fff5857537e90559eebe9acce089110b12e62f52b057d57ccdd310f612779a delete mode 100644 test/functional/update/rename-ghosted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/rename/.gitignore delete mode 100644 test/functional/update/rename/lines-checked delete mode 100755 test/functional/update/rename/test.bats delete mode 100644 test/functional/update/rename/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/rename/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/rename/web-dir/10/staged/0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 delete mode 100644 test/functional/update/rename/web-dir/10/staged/28cb7c6cad23920f344157f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 delete mode 100644 test/functional/update/rename/web-dir/10/staged/e6b5b316f2b470fc5d7a22caf4e7f6c8384a26ac8aacd80ccde5a6bd3838e87f delete mode 100644 test/functional/update/rename/web-dir/10/staged/fdfec2695a18d214f80ef9fa6edde7b9fd64312b6be61f73429c39389e1d1334 delete mode 100644 test/functional/update/rename/web-dir/20/Manifest.MoM delete mode 100644 test/functional/update/rename/web-dir/20/Manifest.os-core delete mode 100644 test/functional/update/rename/web-dir/20/delta/10-20-0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50-0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 delete mode 100644 test/functional/update/rename/web-dir/20/delta/10-20-fdfec2695a18d214f80ef9fa6edde7b9fd64312b6be61f73429c39389e1d1334-c21cc55db744a24867470b7343bdc6bde1c19e4b5a782fd82c84a86b55de6d54 delete mode 100644 test/functional/update/rename/web-dir/20/staged/43fff5857537e90559eebe9acce089110b12e62f52b057d57ccdd310f612779a delete mode 100644 test/functional/update/rename/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/skip-scripts/lines-checked delete mode 100644 test/functional/update/skip-scripts/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/skip-scripts/test.bats delete mode 100644 test/functional/update/skip-scripts/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/skip-scripts/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/skip-scripts/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/skip-scripts/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/skip-scripts/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/skip-scripts/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/skip-verified-fullfiles/lines-checked delete mode 100644 test/functional/update/skip-verified-fullfiles/target-dir/foo delete mode 100644 test/functional/update/skip-verified-fullfiles/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/skip-verified-fullfiles/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/skip-verified-fullfiles/target-dir/usr/share/clear/bundles/test-bundle delete mode 100755 test/functional/update/skip-verified-fullfiles/test.bats delete mode 100644 test/functional/update/skip-verified-fullfiles/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/skip-verified-fullfiles/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/skip-verified-fullfiles/web-dir/10/Manifest.test-bundle delete mode 100644 test/functional/update/skip-verified-fullfiles/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/skip-verified-fullfiles/web-dir/100/Manifest.test-bundle delete mode 100644 test/functional/update/skip-verified-fullfiles/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/slow-server/lines-checked delete mode 100644 test/functional/update/slow-server/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/slow-server/test.bats delete mode 100644 test/functional/update/slow-server/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/slow-server/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/slow-server/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/slow-server/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/slow-server/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/slow-server/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/statedir-bad-hash/ffbe308091534f3b47b876b241166c4c6d0665204977274093f74851380d49b5 delete mode 100644 test/functional/update/statedir-bad-hash/lines-checked delete mode 100644 test/functional/update/statedir-bad-hash/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/statedir-bad-hash/test.bats delete mode 100644 test/functional/update/statedir-bad-hash/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/statedir-bad-hash/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/statedir-bad-hash/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/statedir-bad-hash/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/statedir-bad-hash/web-dir/100/files/ffbe308091534f3b47b876b241166c4c6d0665204977274093f74851380d49b5 delete mode 100644 test/functional/update/statedir-bad-hash/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/status-no-server-content/lines-checked delete mode 100644 test/functional/update/status-no-server-content/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/status-no-server-content/test.bats delete mode 100644 test/functional/update/status-no-server-content/web-dir/.gitignore delete mode 100644 test/functional/update/status-no-target-content/lines-checked delete mode 100644 test/functional/update/status-no-target-content/target-dir/.gitignore delete mode 100755 test/functional/update/status-no-target-content/test.bats delete mode 100644 test/functional/update/status-no-target-content/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/status-version-double-quote/lines-checked delete mode 100644 test/functional/update/status-version-double-quote/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/status-version-double-quote/test.bats delete mode 100644 test/functional/update/status-version-double-quote/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/status-version-single-quote/lines-checked delete mode 100644 test/functional/update/status-version-single-quote/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/status-version-single-quote/test.bats delete mode 100644 test/functional/update/status-version-single-quote/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/status/lines-checked delete mode 100644 test/functional/update/status/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/status/test.bats delete mode 100644 test/functional/update/status/web-dir/version/formatstaging/latest create mode 100755 test/functional/update/update-apply-full-file-delta.bats create mode 100755 test/functional/update/update-boot-file.bats create mode 100755 test/functional/update/update-boot-skip.bats rename test/functional/{update_v2 => update}/update-client-certificate.bats (100%) create mode 100755 test/functional/update/update-delta-without-rename-flag.bats create mode 100755 test/functional/update/update-download.bats create mode 100755 test/functional/update/update-include-old-bundle-with-tracked-file.bats create mode 100755 test/functional/update/update-include-old-bundle.bats create mode 100755 test/functional/update/update-include.bats create mode 100755 test/functional/update/update-missing-os-core.bats create mode 100755 test/functional/update/update-newest-deleted.bats create mode 100755 test/functional/update/update-newest-ghosted.bats create mode 100755 test/functional/update/update-re-update-bad-os-release.bats create mode 100755 test/functional/update/update-re-update-required.bats create mode 100755 test/functional/update/update-rename-ghosted.bats create mode 100755 test/functional/update/update-rename.bats create mode 100755 test/functional/update/update-skip-scripts.bats create mode 100755 test/functional/update/update-skip-verified-fullfiles.bats create mode 100755 test/functional/update/update-slow-server.bats create mode 100755 test/functional/update/update-statedir-bad-hash.bats create mode 100755 test/functional/update/update-status-no-server-content.bats create mode 100755 test/functional/update/update-status-no-target-content.bats create mode 100755 test/functional/update/update-status-version-double-quote.bats create mode 100755 test/functional/update/update-status-version-single-quote.bats create mode 100755 test/functional/update/update-status.bats create mode 100755 test/functional/update/update-use-full-file.bats create mode 100755 test/functional/update/update-use-pack.bats create mode 100755 test/functional/update/update-verify-fix-path-hash-mismatch.bats create mode 100755 test/functional/update/update-verify-fix-path-missing-dir.bats create mode 100755 test/functional/update/update-verify-fullfile-hash.bats rename test/functional/update/{slow-server/server.py => update_slow_server.py} (87%) delete mode 100644 test/functional/update/use-full-file/lines-checked delete mode 100644 test/functional/update/use-full-file/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/use-full-file/test.bats delete mode 100644 test/functional/update/use-full-file/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/use-full-file/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/use-full-file/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/use-full-file/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/use-full-file/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/use-full-file/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/use-pack/lines-checked delete mode 100644 test/functional/update/use-pack/target-dir/usr/lib/os-release delete mode 100755 test/functional/update/use-pack/test.bats delete mode 100644 test/functional/update/use-pack/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/use-pack/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/use-pack/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/use-pack/web-dir/100/Manifest.os-core delete mode 100644 test/functional/update/use-pack/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/use-pack/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/lines-checked delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/share/clear/bundles/test-bundle delete mode 100755 test/functional/update/verify-fix-path-hash-mismatch/test.bats delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.test-bundle delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.test-bundle delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 delete mode 100644 test/functional/update/verify-fix-path-hash-mismatch/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/verify-fix-path-missing-dir/lines-checked delete mode 100644 test/functional/update/verify-fix-path-missing-dir/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/verify-fix-path-missing-dir/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/verify-fix-path-missing-dir/target-dir/usr/share/clear/bundles/test-bundle delete mode 100755 test/functional/update/verify-fix-path-missing-dir/test.bats delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.test-bundle delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.test-bundle delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 delete mode 100644 test/functional/update/verify-fix-path-missing-dir/web-dir/version/formatstaging/latest delete mode 100644 test/functional/update/verify-fullfile-hash/lines-checked delete mode 100644 test/functional/update/verify-fullfile-hash/target-dir/usr/lib/os-release delete mode 100644 test/functional/update/verify-fullfile-hash/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/update/verify-fullfile-hash/target-dir/usr/share/clear/bundles/test-bundle delete mode 100755 test/functional/update/verify-fullfile-hash/test.bats delete mode 100644 test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.MoM delete mode 100644 test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.os-core delete mode 100644 test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.test-bundle delete mode 100644 test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.MoM delete mode 100644 test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.test-bundle delete mode 100644 test/functional/update/verify-fullfile-hash/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 delete mode 100644 test/functional/update/verify-fullfile-hash/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/add-missing-directory/lines-checked delete mode 100644 test/functional/verify/add-missing-directory/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/add-missing-directory/test.bats delete mode 100644 test/functional/verify/add-missing-directory/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/add-missing-directory/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/add-missing-directory/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/add-missing-directory/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/add-missing-include-old/lines-checked delete mode 100644 test/functional/verify/add-missing-include-old/target-dir/usr/lib/os-release delete mode 100644 test/functional/verify/add-missing-include-old/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/verify/add-missing-include-old/target-dir/usr/share/clear/bundles/test-bundle1 delete mode 100755 test/functional/verify/add-missing-include-old/test.bats delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle1 delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle2 delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/100/Manifest.MoM delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/100/Manifest.os-core delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/100/Manifest.test-bundle1 delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/100/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/100/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 delete mode 100644 test/functional/verify/add-missing-include-old/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/add-missing-include/lines-checked delete mode 100644 test/functional/verify/add-missing-include/target-dir/usr/lib/os-release delete mode 100644 test/functional/verify/add-missing-include/target-dir/usr/share/clear/bundles/os-core delete mode 100644 test/functional/verify/add-missing-include/target-dir/usr/share/clear/bundles/test-bundle1 delete mode 100755 test/functional/verify/add-missing-include/test.bats delete mode 100644 test/functional/verify/add-missing-include/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/add-missing-include/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle1 delete mode 100644 test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle2 delete mode 100644 test/functional/verify/add-missing-include/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 delete mode 100644 test/functional/verify/add-missing-include/web-dir/10/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 delete mode 100644 test/functional/verify/add-missing-include/web-dir/10/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 delete mode 100644 test/functional/verify/add-missing-include/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/boot-file-deleted/lines-checked delete mode 100644 test/functional/verify/boot-file-deleted/target-dir/usr/lib/kernel/testfile delete mode 100644 test/functional/verify/boot-file-deleted/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/boot-file-deleted/test.bats delete mode 100644 test/functional/verify/boot-file-deleted/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/boot-file-deleted/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/boot-file-deleted/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 delete mode 100644 test/functional/verify/boot-file-deleted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/boot-file-mismatch-fix/lines-checked delete mode 100644 test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile delete mode 100644 test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile.backup delete mode 100644 test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/boot-file-mismatch-fix/test.bats delete mode 100644 test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/boot-file-mismatch-fix/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 delete mode 100644 test/functional/verify/boot-file-mismatch-fix/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/boot-file-mismatch/lines-checked delete mode 100644 test/functional/verify/boot-file-mismatch/target-dir/usr/lib/kernel/testfile delete mode 100644 test/functional/verify/boot-file-mismatch/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/boot-file-mismatch/test.bats delete mode 100644 test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/boot-file-mismatch/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/boot-skip/lines-checked delete mode 100644 test/functional/verify/boot-skip/target-dir/usr/lib/kernel/testfile delete mode 100644 test/functional/verify/boot-skip/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/boot-skip/test.bats delete mode 100644 test/functional/verify/boot-skip/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/boot-skip/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/boot-skip/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 delete mode 100644 test/functional/verify/boot-skip/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/check-missing-directory/lines-checked delete mode 100644 test/functional/verify/check-missing-directory/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/check-missing-directory/test.bats delete mode 100644 test/functional/verify/check-missing-directory/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/check-missing-directory/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/check-missing-directory/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/directory-tree-deleted/lines-checked delete mode 100644 test/functional/verify/directory-tree-deleted/target-dir/testdir1/testdir2/testfile delete mode 100644 test/functional/verify/directory-tree-deleted/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/directory-tree-deleted/test.bats delete mode 100644 test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/directory-tree-deleted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/empty-dir-deleted/lines-checked delete mode 100644 test/functional/verify/empty-dir-deleted/target-dir/testdir/.gitignore delete mode 100644 test/functional/verify/empty-dir-deleted/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/empty-dir-deleted/test.bats delete mode 100644 test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/empty-dir-deleted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/fix-version-mismatch-override/lines-checked delete mode 100644 test/functional/verify/fix-version-mismatch-override/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/fix-version-mismatch-override/test.bats delete mode 100644 test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/fix-version-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.MoM delete mode 100644 test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.os-core delete mode 100644 test/functional/verify/fix-version-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/fix-version-mismatch-override/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/fix-version-mismatch/lines-checked delete mode 100644 test/functional/verify/fix-version-mismatch/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/fix-version-mismatch/test.bats delete mode 100644 test/functional/verify/fix-version-mismatch/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.MoM delete mode 100644 test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.os-core delete mode 100644 test/functional/verify/fix-version-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/fix-version-mismatch/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/format-mismatch-override/lines-checked delete mode 100644 test/functional/verify/format-mismatch-override/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/format-mismatch-override/test.bats delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/20/Manifest.MoM delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/20/Manifest.os-core delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/version/format1/latest delete mode 100644 test/functional/verify/format-mismatch-override/web-dir/version/format2/latest delete mode 100644 test/functional/verify/format-mismatch/lines-checked delete mode 100644 test/functional/verify/format-mismatch/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/format-mismatch/test.bats delete mode 100644 test/functional/verify/format-mismatch/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/format-mismatch/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/format-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/format-mismatch/web-dir/20/Manifest.MoM delete mode 100644 test/functional/verify/format-mismatch/web-dir/20/Manifest.os-core delete mode 100644 test/functional/verify/format-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/format-mismatch/web-dir/version/format1/latest delete mode 100644 test/functional/verify/format-mismatch/web-dir/version/format2/latest delete mode 100644 test/functional/verify/ghosted/lines-checked delete mode 100644 test/functional/verify/ghosted/target-dir.bak/foo delete mode 100644 test/functional/verify/ghosted/target-dir/foo delete mode 100644 test/functional/verify/ghosted/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/ghosted/test.bats delete mode 100644 test/functional/verify/ghosted/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/ghosted/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/ghosted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/install-directory/lines-checked delete mode 100644 test/functional/verify/install-directory/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/install-directory/test.bats delete mode 100644 test/functional/verify/install-directory/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/install-directory/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/install-directory/web-dir/10/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/install-directory/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/install-latest-directory/lines-checked delete mode 100644 test/functional/verify/install-latest-directory/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/install-latest-directory/test.bats delete mode 100644 test/functional/verify/install-latest-directory/web-dir/100/Manifest.MoM delete mode 100644 test/functional/verify/install-latest-directory/web-dir/100/Manifest.os-core delete mode 100644 test/functional/verify/install-latest-directory/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore delete mode 100644 test/functional/verify/install-latest-directory/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/latest-missing/lines-checked delete mode 100644 test/functional/verify/latest-missing/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/latest-missing/test.bats delete mode 100644 test/functional/verify/picky-ghosted-missing/lines-checked delete mode 100644 test/functional/verify/picky-ghosted-missing/target-dir.bak/usr/lib/os-release delete mode 100644 test/functional/verify/picky-ghosted-missing/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/picky-ghosted-missing/test.bats delete mode 100644 test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/picky-ghosted-missing/web-dir/10/files/17a3a547dc2ccfd56bf13f9ed90d086d0d5967127086f223a4a514c7c468ed19 delete mode 100644 test/functional/verify/picky-ghosted-missing/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/picky-ghosted/lines-checked delete mode 100644 test/functional/verify/picky-ghosted/target-dir.bak/usr/foo delete mode 100644 test/functional/verify/picky-ghosted/target-dir.bak/usr/lib/os-release delete mode 100644 test/functional/verify/picky-ghosted/target-dir/usr/foo delete mode 100644 test/functional/verify/picky-ghosted/target-dir/usr/lib/os-release delete mode 100755 test/functional/verify/picky-ghosted/test.bats delete mode 100644 test/functional/verify/picky-ghosted/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/picky-ghosted/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/picky-ghosted/web-dir/version/formatstaging/latest delete mode 100644 test/functional/verify/skip-scripts/lines-checked delete mode 100644 test/functional/verify/skip-scripts/target-dir/usr/lib/os-release delete mode 100644 test/functional/verify/skip-scripts/target-dir/usr/lib/testfile delete mode 100755 test/functional/verify/skip-scripts/test.bats delete mode 100644 test/functional/verify/skip-scripts/web-dir/10/Manifest.MoM delete mode 100644 test/functional/verify/skip-scripts/web-dir/10/Manifest.os-core delete mode 100644 test/functional/verify/skip-scripts/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 delete mode 100644 test/functional/verify/skip-scripts/web-dir/version/formatstaging/latest create mode 100755 test/functional/verify/verify-add-missing-directory.bats create mode 100755 test/functional/verify/verify-add-missing-include-old.bats create mode 100755 test/functional/verify/verify-add-missing-include.bats create mode 100755 test/functional/verify/verify-boot-file-deleted.bats create mode 100755 test/functional/verify/verify-boot-file-mismatch-fix.bats create mode 100755 test/functional/verify/verify-boot-file-mismatch.bats create mode 100755 test/functional/verify/verify-boot-skip.bats create mode 100755 test/functional/verify/verify-check-missing-directory.bats rename test/functional/{verify_v2 => verify}/verify-client-certificate.bats (100%) create mode 100755 test/functional/verify/verify-directory-tree-deleted.bats create mode 100755 test/functional/verify/verify-empty-dir-deleted.bats create mode 100755 test/functional/verify/verify-fix-version-mismatch-override.bats create mode 100755 test/functional/verify/verify-fix-version-mismatch.bats create mode 100755 test/functional/verify/verify-format-mismatch-override.bats create mode 100755 test/functional/verify/verify-format-mismatch.bats create mode 100755 test/functional/verify/verify-ghosted.bats create mode 100755 test/functional/verify/verify-install-directory.bats create mode 100755 test/functional/verify/verify-install-latest-directory.bats create mode 100755 test/functional/verify/verify-latest-missing.bats create mode 100755 test/functional/verify/verify-picky-ghosted-missing.bats create mode 100755 test/functional/verify/verify-picky-ghosted.bats create mode 100755 test/functional/verify/verify-skip-scripts.bats diff --git a/Makefile.am b/Makefile.am index f78dc29b..6391bb46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -158,58 +158,58 @@ BATS = \ test/functional/search/search-content-check-negative.bats \ test/functional/search/search-content-check-positive.bats \ test/functional/search/search-client-certificate.bats \ - test/functional/update/apply-full-file-delta/test.bats \ - test/functional/update/boot-file/test.bats \ - test/functional/update/boot-skip/test.bats \ - test/functional/update/delta-without-rename-flag/test.bats \ - test/functional/update/download/test.bats \ - test/functional/update/include/test.bats \ - test/functional/update/include-old-bundle/test.bats \ - test/functional/update/include-old-bundle-with-tracked-file/test.bats \ - test/functional/update/missing-os-core/test.bats \ - test/functional/update/newest-deleted/test.bats \ - test/functional/update/newest-ghosted/test.bats \ - test/functional/update/rename/test.bats \ - test/functional/update/rename-ghosted/test.bats \ - test/functional/update/skip-scripts/test.bats \ - test/functional/update/skip-verified-fullfiles/test.bats \ - test/functional/update/status/test.bats \ - test/functional/update/status-no-server-content/test.bats \ - test/functional/update/status-no-target-content/test.bats \ - test/functional/update/status-version-double-quote/test.bats \ - test/functional/update/status-version-single-quote/test.bats \ - test/functional/update/use-full-file/test.bats \ - test/functional/update/use-pack/test.bats \ - test/functional/update/verify-fix-path-hash-mismatch/test.bats \ - test/functional/update/verify-fix-path-missing-dir/test.bats \ - test/functional/update/verify-fullfile-hash/test.bats \ - test/functional/update/re-update-required/test.bats \ - test/functional/update/re-update-bad-os-release/test.bats \ - test/functional/update/slow-server/test.bats \ - test/functional/update/statedir-bad-hash/test.bats \ - test/functional/update_v2/update-client-certificate.bats \ - test/functional/verify/add-missing-directory/test.bats \ - test/functional/verify/add-missing-include/test.bats \ - test/functional/verify/add-missing-include-old/test.bats \ - test/functional/verify/boot-file-deleted/test.bats \ - test/functional/verify/boot-file-mismatch/test.bats \ - test/functional/verify/boot-file-mismatch-fix/test.bats \ - test/functional/verify/boot-skip/test.bats \ - test/functional/verify/check-missing-directory/test.bats \ - test/functional/verify/directory-tree-deleted/test.bats \ - test/functional/verify/empty-dir-deleted/test.bats \ - test/functional/verify/fix-version-mismatch/test.bats \ - test/functional/verify/fix-version-mismatch-override/test.bats \ - test/functional/verify/format-mismatch/test.bats \ - test/functional/verify/format-mismatch-override/test.bats \ - test/functional/verify/ghosted/test.bats \ - test/functional/verify/install-directory/test.bats \ - test/functional/verify/install-latest-directory/test.bats \ - test/functional/verify/latest-missing/test.bats \ - test/functional/verify/picky-ghosted/test.bats \ - test/functional/verify/picky-ghosted-missing/test.bats \ - test/functional/verify/skip-scripts/test.bats \ - test/functional/verify_v2/verify-client-certificate.bats + test/functional/update/update-apply-full-file-delta.bats \ + test/functional/update/update-boot-file.bats \ + test/functional/update/update-boot-skip.bats \ + test/functional/update/update-client-certificate.bats \ + test/functional/update/update-delta-without-rename-flag.bats \ + test/functional/update/update-download.bats \ + test/functional/update/update-include.bats \ + test/functional/update/update-include-old-bundle.bats \ + test/functional/update/update-include-old-bundle-with-tracked-file.bats \ + test/functional/update/update-missing-os-core.bats \ + test/functional/update/update-newest-deleted.bats \ + test/functional/update/update-newest-ghosted.bats \ + test/functional/update/update-rename.bats \ + test/functional/update/update-rename-ghosted.bats \ + test/functional/update/update-re-update-bad-os-release.bats \ + test/functional/update/update-re-update-required.bats \ + test/functional/update/update-skip-scripts.bats \ + test/functional/update/update-skip-verified-fullfiles.bats \ + test/functional/update/update-slow-server.bats \ + test/functional/update/update-statedir-bad-hash.bats \ + test/functional/update/update-status.bats \ + test/functional/update/update-status-no-server-content.bats \ + test/functional/update/update-status-no-target-content.bats \ + test/functional/update/update-status-version-double-quote.bats \ + test/functional/update/update-status-version-single-quote.bats \ + test/functional/update/update-use-full-file.bats \ + test/functional/update/update-use-pack.bats \ + test/functional/update/update-verify-fix-path-hash-mismatch.bats \ + test/functional/update/update-verify-fix-path-missing-dir.bats \ + test/functional/update/update-verify-fullfile-hash.bats \ + test/functional/verify/verify-add-missing-directory.bats \ + test/functional/verify/verify-add-missing-include.bats \ + test/functional/verify/verify-add-missing-include-old.bats \ + test/functional/verify/verify-boot-file-deleted.bats \ + test/functional/verify/verify-boot-file-mismatch.bats \ + test/functional/verify/verify-boot-file-mismatch-fix.bats \ + test/functional/verify/verify-boot-skip.bats \ + test/functional/verify/verify-check-missing-directory.bats \ + test/functional/verify/verify-client-certificate.bats + test/functional/verify/verify-directory-tree-deleted.bats \ + test/functional/verify/verify-empty-dir-deleted.bats \ + test/functional/verify/verify-fix-version-mismatch.bats \ + test/functional/verify/verify-fix-version-mismatch-override.bats \ + test/functional/verify/verify-format-mismatch.bats \ + test/functional/verify/verify-format-mismatch-override.bats \ + test/functional/verify/verify-ghosted.bats \ + test/functional/verify/verify-install-directory.bats \ + test/functional/verify/verify-install-latest-directory.bats \ + test/functional/verify/verify-latest-missing.bats \ + test/functional/verify/verify-picky-ghosted.bats \ + test/functional/verify/verify-picky-ghosted-missing.bats \ + test/functional/verify/verify-skip-scripts.bats dist_check_SCRIPTS = $(BATS) # Must be run before all other tests diff --git a/test/functional/update/apply-full-file-delta/lines-checked b/test/functional/update/apply-full-file-delta/lines-checked deleted file mode 100644 index 46230ee0..00000000 --- a/test/functional/update/apply-full-file-delta/lines-checked +++ /dev/null @@ -1,16 +0,0 @@ -Update started. -Preparing to update from 10 to 100 -Extracting os-core pack for version 100 -Statistics for going from version 10 to version 100: - changed bundles : 1 - new bundles : 0 - deleted bundles : 0 - changed files : 1 - new files : 0 - deleted files : 0 -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Staging file content -Applying update -Update was applied. -Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/apply-full-file-delta/target-dir/usr/lib/os-release b/test/functional/update/apply-full-file-delta/target-dir/usr/lib/os-release deleted file mode 100644 index b01f31ec..00000000 --- a/test/functional/update/apply-full-file-delta/target-dir/usr/lib/os-release +++ /dev/null @@ -1 +0,0 @@ -VERSION_ID=10 diff --git a/test/functional/update/apply-full-file-delta/test.bats b/test/functional/update/apply-full-file-delta/test.bats deleted file mode 100755 index 53ea1ba1..00000000 --- a/test/functional/update/apply-full-file-delta/test.bats +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -deltafile="10-100-0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962-9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 os-core - chown_root "$DIR/web-dir/100/delta/$deltafile" - cp "$DIR/web-dir/10/staged/0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962" "$DIR/target-dir/testfile" - chown_root "$DIR/target-dir/testfile" - mkdir -p "$DIR/web-dir/100/staged" - tar -C "$DIR/web-dir/100" -cf "$DIR/web-dir/100/pack-os-core-from-10.tar" delta/$deltafile staged/ -} - -teardown() { - clean_tars 10 - clean_tars 100 - rmdir "$DIR/web-dir/100/staged" - revert_chown_root "$DIR/web-dir/100/delta/$deltafile" - sudo rm "$DIR/target-dir/testfile" -} - -@test "update use delta pack" { - run sudo sh -c "$SWUPD update $SWUPD_OPTS" - - check_lines "$output" - - run sudo sh -c "$SWUPD hashdump $DIR/target-dir/testfile" - - [ "$status" -eq 0 ] - echo "$output" - [ "${lines[1]}" = "9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/update/apply-full-file-delta/web-dir/10/Manifest.MoM b/test/functional/update/apply-full-file-delta/web-dir/10/Manifest.MoM deleted file mode 100644 index 04b97010..00000000 --- a/test/functional/update/apply-full-file-delta/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... dbdba26e0552fdd75b5775fe6c08bae44ea2f73d6b039b598e8a031a14ab90cc 10 os-core diff --git a/test/functional/update/apply-full-file-delta/web-dir/10/Manifest.os-core b/test/functional/update/apply-full-file-delta/web-dir/10/Manifest.os-core deleted file mode 100644 index 75da6138..00000000 --- a/test/functional/update/apply-full-file-delta/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -F... 0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962 10 /testfile diff --git a/test/functional/update/apply-full-file-delta/web-dir/10/staged/0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962 b/test/functional/update/apply-full-file-delta/web-dir/10/staged/0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962 deleted file mode 100644 index 33497358..00000000 --- a/test/functional/update/apply-full-file-delta/web-dir/10/staged/0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962 +++ /dev/null @@ -1,17 +0,0 @@ -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content -orig content diff --git a/test/functional/update/apply-full-file-delta/web-dir/100/Manifest.MoM b/test/functional/update/apply-full-file-delta/web-dir/100/Manifest.MoM deleted file mode 100644 index 6e84f643..00000000 --- a/test/functional/update/apply-full-file-delta/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 6eb0e7f63e37d7d7bb4da5373f470fba55abd13030b8a4251a0bfbe4f84a20c9 100 os-core diff --git a/test/functional/update/apply-full-file-delta/web-dir/100/Manifest.os-core b/test/functional/update/apply-full-file-delta/web-dir/100/Manifest.os-core deleted file mode 100644 index 0e2106ed..00000000 --- a/test/functional/update/apply-full-file-delta/web-dir/100/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -F... 9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a 100 /testfile diff --git a/test/functional/update/apply-full-file-delta/web-dir/100/delta/10-100-0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962-9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a b/test/functional/update/apply-full-file-delta/web-dir/100/delta/10-100-0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962-9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a deleted file mode 100644 index 6c12b376fdeb911ef33e652d00e1f1120dc05fbe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78 zcmZS&O90E00Q8vpS&O90E00Q8vpS&O90E00Q8vp&3 + print "server killed" + destroy_test_environment "$TEST_NAME" + fi + +} + +@test "update --download with a slow server" { + + # Pre-req: create a web server that can serve as a slow content download server + print "starting web server..." + start_web_server + slow_opts="-u http://localhost:$port/" + + run sudo sh -c "$SWUPD update $slow_opts $SWUPD_OPTS" + + assert_status_is 0 + expected_output=$(cat <<-EOM + Update started. + Preparing to update from 10 to 100 + Downloading packs... + Error for .*update-slow-server/state/pack-test-bundle-from-10-to-100.tar download: Response 206 - No error + Starting download retry #1 for .*100/pack-test-bundle-from-10.tar + Error for .*update-slow-server/state/pack-test-bundle-from-10-to-100.tar download: Response 200 - Requested range was not delivered by the server + Range command not supported by server, download resume disabled. + Starting download retry #2 for .*100/pack-test-bundle-from-10.tar + Extracting test-bundle pack for version 100 + Statistics for going from version 10 to version 100: + changed bundles : 1 + new bundles : 0 + deleted bundles : 0 + changed files : 1 + new files : 0 + deleted files : 0 + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Staging file content + Applying update + Update was applied. + Calling post-update helper scripts. + Update successful. System updated from version 10 to version 100 + EOM + ) + assert_regex_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/foo/bar + +} + +start_web_server() { + + for i in {8081..8181}; do + "$THEME_DIRNAME"/update_slow_server.py $i & + sleep .5 + server_pid=$! + if [ -d /proc/$server_pid ]; then + port=$i + break + fi + done + + # wait until server becomes available by expecting a successful curl + for i in $(seq 1 10); do + flag=true + curl http://localhost:"$port"/ || flag=false + if [ "$flag" == false ]; then + sleep .5 + continue + else + print "server up" + break + fi + done + +} diff --git a/test/functional/update/update-statedir-bad-hash.bats b/test/functional/update/update-statedir-bad-hash.bats new file mode 100755 index 00000000..9ae9af68 --- /dev/null +++ b/test/functional/update/update-statedir-bad-hash.bats @@ -0,0 +1,47 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" os-core --add /test-file + file_hash=$(get_hash_from_manifest "$TEST_NAME"/web-dir/100/Manifest.os-core /test-file) + # copy the file from the files directory to state/staged and modify it + sudo cp "$WEBDIR"/100/files/"$file_hash" "$STATEDIR"/staged/ + write_to_protected_file -a "$STATEDIR"/staged/"$file_hash" "extra string" + +} + +@test "update full file with bad hash in state dir" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Update started. + Preparing to update from 10 to 100 + Downloading packs... + Extracting os-core pack for version 100 + Statistics for going from version 10 to version 100: + changed bundles : 1 + new bundles : 0 + deleted bundles : 0 + changed files : 0 + new files : 1 + deleted files : 0 + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Staging file content + Applying update + Update was applied. + Calling post-update helper scripts. + Update successful. System updated from version 10 to version 100 + EOM + ) + # no errors are printed for a mismatched hash + assert_is_output "$expected_output" + # the file exists on the filesystem (it does not exist before the test) + assert_file_exists "$TARGETDIR"/test-file + +} diff --git a/test/functional/update/update-status-no-server-content.bats b/test/functional/update/update-status-no-server-content.bats new file mode 100755 index 00000000..8a950241 --- /dev/null +++ b/test/functional/update/update-status-no-server-content.bats @@ -0,0 +1,23 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + sudo rm -rf "$WEBDIR"/version + +} + +@test "update --status with no server content" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS --status" + assert_status_is 2 + expected_output=$(cat <<-EOM + Current OS version: 10 + Cannot get the latest server version. Could not reach server + EOM + ) + assert_is_output "$expected_output" +} + diff --git a/test/functional/update/update-status-no-target-content.bats b/test/functional/update/update-status-no-target-content.bats new file mode 100755 index 00000000..6803c1b1 --- /dev/null +++ b/test/functional/update/update-status-no-target-content.bats @@ -0,0 +1,24 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + set_latest_version "$TEST_NAME" 100 + sudo rm -f "$TARGETDIR"/usr/lib/os-release + +} + +@test "update --status with no target content" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS --status" + assert_status_is 2 + expected_output=$(cat <<-EOM + Cannot determine current OS version + Latest server version: 100 + EOM + ) + assert_is_output "$expected_output" + +} diff --git a/test/functional/update/update-status-version-double-quote.bats b/test/functional/update/update-status-version-double-quote.bats new file mode 100755 index 00000000..b95a66c5 --- /dev/null +++ b/test/functional/update/update-status-version-double-quote.bats @@ -0,0 +1,24 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + set_current_version "$TEST_NAME" "\"10\"" + set_latest_version "$TEST_NAME" 100 + +} + +@test "update --status with double quote version" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS --status" + assert_status_is 0 + expected_output=$(cat <<-EOM + Current OS version: 10 + Latest server version: 100 + EOM + ) + assert_is_output "$expected_output" + +} diff --git a/test/functional/update/update-status-version-single-quote.bats b/test/functional/update/update-status-version-single-quote.bats new file mode 100755 index 00000000..39598fe5 --- /dev/null +++ b/test/functional/update/update-status-version-single-quote.bats @@ -0,0 +1,24 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + set_current_version "$TEST_NAME" "\'10\'" + set_latest_version "$TEST_NAME" 100 + +} + +@test "update --status with single quote version" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS --status" + assert_status_is 0 + expected_output=$(cat <<-EOM + Current OS version: 10 + Latest server version: 100 + EOM + ) + assert_status_is "$expected_output" + +} diff --git a/test/functional/update/update-status.bats b/test/functional/update/update-status.bats new file mode 100755 index 00000000..3e0b5c85 --- /dev/null +++ b/test/functional/update/update-status.bats @@ -0,0 +1,23 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + set_latest_version "$TEST_NAME" 100 + +} + +@test "update --status" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS --status" + assert_status_is 0 + expected_output=$(cat <<-EOM + Current OS version: 10 + Latest server version: 100 + EOM + ) + assert_is_output "$expected_output" + +} diff --git a/test/functional/update/update-use-full-file.bats b/test/functional/update/update-use-full-file.bats new file mode 100755 index 00000000..69c2881d --- /dev/null +++ b/test/functional/update/update-use-full-file.bats @@ -0,0 +1,44 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" os-core --update /core + # remove packs so full file is used + sudo rm -rf "$WEBDIR"/100/pack-* + sudo rm -f "$WEBDIR"/100/delta/* + +} + +@test "update use full file" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Update started. + Preparing to update from 10 to 100 + Downloading packs... + Statistics for going from version 10 to version 100: + changed bundles : 1 + new bundles : 0 + deleted bundles : 0 + changed files : 1 + new files : 0 + deleted files : 0 + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Staging file content + Applying update + Update was applied. + Calling post-update helper scripts. + 1 files were not in a pack + Update successful. System updated from version 10 to version 100 + EOM + ) + assert_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/core + +} diff --git a/test/functional/update/update-use-pack.bats b/test/functional/update/update-use-pack.bats new file mode 100755 index 00000000..53d7e5bb --- /dev/null +++ b/test/functional/update/update-use-pack.bats @@ -0,0 +1,41 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" os-core --update /core + +} + +@test "update using a pack" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Update started. + Preparing to update from 10 to 100 + Downloading packs... + Extracting os-core pack for version 100 + Statistics for going from version 10 to version 100: + changed bundles : 1 + new bundles : 0 + deleted bundles : 0 + changed files : 1 + new files : 0 + deleted files : 0 + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Staging file content + Applying update + Update was applied. + Calling post-update helper scripts. + Update successful. System updated from version 10 to version 100 + EOM + ) + assert_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/core + +} diff --git a/test/functional/update/update-verify-fix-path-hash-mismatch.bats b/test/functional/update/update-verify-fix-path-hash-mismatch.bats new file mode 100755 index 00000000..d791f991 --- /dev/null +++ b/test/functional/update/update-verify-fix-path-hash-mismatch.bats @@ -0,0 +1,53 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -f /usr/foo/test-file "$TEST_NAME" + # remove the installed foo directory + sudo rm -rf "$TARGETDIR"/usr/foo + # change permissions of the installed usr directory so the hash doesn't match + sudo chmod g+w "$TARGETDIR"/usr + # create an update + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" test-bundle --update /usr/foo/test-file + +} + +@test "update verify_fix_path corrects hash mismatch" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Update started. + Preparing to update from 10 to 100 + Downloading packs... + Extracting test-bundle pack for version 100 + Couldn.t use delta file .* + Statistics for going from version 10 to version 100: + changed bundles : 1 + new bundles : 0 + deleted bundles : 0 + changed files : 1 + new files : 0 + deleted files : 0 + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Staging file content + Update target directory does not exist: .*/target-dir/usr/foo. Trying to fix it + Hash did not match for path : /usr ... fixing + Path /usr/foo is missing on the file system ... fixing + Applying update + Update was applied. + Calling post-update helper scripts. + 1 files were not in a pack + Update successful. System updated from version 10 to version 100 + EOM + ) + assert_regex_is_output "$expected_output" + assert_dir_exists "$TARGETDIR"/usr/foo + assert_file_exists "$TARGETDIR"/usr/foo/test-file + +} diff --git a/test/functional/update/update-verify-fix-path-missing-dir.bats b/test/functional/update/update-verify-fix-path-missing-dir.bats new file mode 100755 index 00000000..8be05452 --- /dev/null +++ b/test/functional/update/update-verify-fix-path-missing-dir.bats @@ -0,0 +1,50 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -f /usr/foo/test-file "$TEST_NAME" + # remove the foo dir + sudo rm -rf "$TARGETDIR"/usr/foo + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" test-bundle --update /usr/foo/test-file + +} + +@test "update verify_fix_path corrects missing directory" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Update started. + Preparing to update from 10 to 100 + Downloading packs... + Extracting test-bundle pack for version 100 + Couldn.t use delta file .* + Statistics for going from version 10 to version 100: + changed bundles : 1 + new bundles : 0 + deleted bundles : 0 + changed files : 1 + new files : 0 + deleted files : 0 + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Staging file content + Update target directory does not exist: .*/target-dir/usr/foo. Trying to fix it + Path /usr/foo is missing on the file system ... fixing + Applying update + Update was applied. + Calling post-update helper scripts. + 1 files were not in a pack + Update successful. System updated from version 10 to version 100 + EOM + ) + assert_regex_is_output "$expected_output" + assert_dir_exists "$TARGETDIR"/usr/foo + assert_file_exists "$TARGETDIR"/usr/foo/test-file + +} + diff --git a/test/functional/update/update-verify-fullfile-hash.bats b/test/functional/update/update-verify-fullfile-hash.bats new file mode 100755 index 00000000..b13e1617 --- /dev/null +++ b/test/functional/update/update-verify-fullfile-hash.bats @@ -0,0 +1,45 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" os-core --update /core + file_hash=$(get_hash_from_manifest "$WEBDIR"/100/Manifest.os-core /core) + # remove the /usr/bin/core file from the system + sudo rm -f "$TARGETDIR"/core + # remove packs so fullfiles are used + sudo rm -rf "$WEBDIR"/100/pack-* + # modify the fullfile so it is corrupt + write_to_protected_file -a "$WEBDIR"/100/files/"$file_hash" "some extra stuff to break the hash" + sudo rm "$WEBDIR"/100/files/"$file_hash".tar + create_tar "$WEBDIR"/100/files/"$file_hash" + +} + +@test "update fullfile hashes verified" { + + run sudo sh -c "$SWUPD update $SWUPD_OPTS" + assert_status_is 1 + expected_output=$(cat <<-EOM + Update started. + Preparing to update from 10 to 100 + Downloading packs... + Statistics for going from version 10 to version 100: + changed bundles : 1 + new bundles : 0 + deleted bundles : 0 + changed files : 1 + new files : 0 + deleted files : 0 + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Error: File content hash mismatch for .* \(bad server data\?\) + EOM + ) + assert_regex_is_output "$expected_output" + assert_file_not_exists "$TARGETDIR"/core + +} diff --git a/test/functional/update/slow-server/server.py b/test/functional/update/update_slow_server.py similarity index 87% rename from test/functional/update/slow-server/server.py rename to test/functional/update/update_slow_server.py index 405142d1..a9c5579d 100755 --- a/test/functional/update/slow-server/server.py +++ b/test/functional/update/update_slow_server.py @@ -10,7 +10,7 @@ class SlowResponse(server.BaseHTTPRequestHandler): """Handler that returns data with a set delay between writes""" def do_GET(self): try: - f = open('web-dir/' + self.path, 'rb') + f = open('update-slow-server/web-dir/' + self.path, 'rb') except: self.send_response(404) self.end_headers() @@ -18,7 +18,7 @@ class SlowResponse(server.BaseHTTPRequestHandler): #Simulate partial download partial_download = False - if self.path == "//100/pack-os-core-from-10.tar" and SlowResponse.first_time: + if self.path == "//100/pack-test-bundle-from-10.tar" and SlowResponse.first_time: partial_download = True SlowResponse.first_time = False self.send_response(206) diff --git a/test/functional/update/use-full-file/lines-checked b/test/functional/update/use-full-file/lines-checked deleted file mode 100644 index 95129d6b..00000000 --- a/test/functional/update/use-full-file/lines-checked +++ /dev/null @@ -1,16 +0,0 @@ -Update started. -Preparing to update from 10 to 100 -Statistics for going from version 10 to version 100: - changed bundles : 1 - new bundles : 0 - deleted bundles : 0 - changed files : 1 - new files : 0 - deleted files : 0 -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Staging file content -Applying update -Update was applied. -1 files were not in a pack -Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/use-full-file/target-dir/usr/lib/os-release b/test/functional/update/use-full-file/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/update/use-full-file/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/update/use-full-file/test.bats b/test/functional/update/use-full-file/test.bats deleted file mode 100755 index 26d9f1c5..00000000 --- a/test/functional/update/use-full-file/test.bats +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 os-core - create_fullfile_tar 100 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 100 - clean_tars 100 files - revert_chown_root "$DIR/web-dir/100/files/$targetfile" - sudo rmdir "$DIR/target-dir/usr/bin/" -} - -@test "update use full file" { - run sudo sh -c "$SWUPD update $SWUPD_OPTS" - - [ "$status" -eq 0 ] - check_lines "$output" - [ -d "$DIR/target-dir/usr/bin" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/update/use-full-file/web-dir/10/Manifest.MoM b/test/functional/update/use-full-file/web-dir/10/Manifest.MoM deleted file mode 100644 index 5f3034d9..00000000 --- a/test/functional/update/use-full-file/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 624af832ff42f0b0592817db4b1bff9672d791592961605cf6e8dc8f5badf4e0 10 os-core diff --git a/test/functional/update/use-full-file/web-dir/10/Manifest.os-core b/test/functional/update/use-full-file/web-dir/10/Manifest.os-core deleted file mode 100644 index dfb192ab..00000000 --- a/test/functional/update/use-full-file/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 11251b2c86785c8f5a9328b372e42f9356bd6d1dd2ef4dcf431b8999b31c2e26 10 /usr/bin diff --git a/test/functional/update/use-full-file/web-dir/100/Manifest.MoM b/test/functional/update/use-full-file/web-dir/100/Manifest.MoM deleted file mode 100644 index f14ff4ab..00000000 --- a/test/functional/update/use-full-file/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 26e45e3e60cf47097f2ff2f5b41ba9512bc3793b5351a60a9fe49ea80fd4b5fe 100 os-core diff --git a/test/functional/update/use-full-file/web-dir/100/Manifest.os-core b/test/functional/update/use-full-file/web-dir/100/Manifest.os-core deleted file mode 100644 index fd0680b1..00000000 --- a/test/functional/update/use-full-file/web-dir/100/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 100 /usr/bin diff --git a/test/functional/update/use-full-file/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/update/use-full-file/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/update/use-full-file/web-dir/100/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/update/use-full-file/web-dir/version/formatstaging/latest b/test/functional/update/use-full-file/web-dir/version/formatstaging/latest deleted file mode 100644 index 29d6383b..00000000 --- a/test/functional/update/use-full-file/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/test/functional/update/use-pack/lines-checked b/test/functional/update/use-pack/lines-checked deleted file mode 100644 index 46230ee0..00000000 --- a/test/functional/update/use-pack/lines-checked +++ /dev/null @@ -1,16 +0,0 @@ -Update started. -Preparing to update from 10 to 100 -Extracting os-core pack for version 100 -Statistics for going from version 10 to version 100: - changed bundles : 1 - new bundles : 0 - deleted bundles : 0 - changed files : 1 - new files : 0 - deleted files : 0 -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Staging file content -Applying update -Update was applied. -Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/use-pack/target-dir/usr/lib/os-release b/test/functional/update/use-pack/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/update/use-pack/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/update/use-pack/test.bats b/test/functional/update/use-pack/test.bats deleted file mode 100755 index 73f7dd0f..00000000 --- a/test/functional/update/use-pack/test.bats +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 os-core - # create_pack_tar 10 100 os-core $targetfile - chown_root "$DIR/web-dir/100/staged/$targetfile" - tar -C "$DIR/web-dir/100" -cf "$DIR/web-dir/100/pack-os-core-from-10.tar" --exclude=staged/$targetfile/* staged/$targetfile -} - -teardown() { - clean_tars 10 - clean_tars 100 - revert_chown_root "$DIR/web-dir/100/staged/$targetfile" - sudo rmdir "$DIR/target-dir/usr/bin" -} - -@test "update using a pack" { - run sudo sh -c "$SWUPD update $SWUPD_OPTS" - - [ "$status" -eq 0 ] - check_lines "$output" - [ -d "$DIR/target-dir/usr/bin" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/update/use-pack/web-dir/10/Manifest.MoM b/test/functional/update/use-pack/web-dir/10/Manifest.MoM deleted file mode 100644 index 5f3034d9..00000000 --- a/test/functional/update/use-pack/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 624af832ff42f0b0592817db4b1bff9672d791592961605cf6e8dc8f5badf4e0 10 os-core diff --git a/test/functional/update/use-pack/web-dir/10/Manifest.os-core b/test/functional/update/use-pack/web-dir/10/Manifest.os-core deleted file mode 100644 index dfb192ab..00000000 --- a/test/functional/update/use-pack/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 11251b2c86785c8f5a9328b372e42f9356bd6d1dd2ef4dcf431b8999b31c2e26 10 /usr/bin diff --git a/test/functional/update/use-pack/web-dir/100/Manifest.MoM b/test/functional/update/use-pack/web-dir/100/Manifest.MoM deleted file mode 100644 index f14ff4ab..00000000 --- a/test/functional/update/use-pack/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 26e45e3e60cf47097f2ff2f5b41ba9512bc3793b5351a60a9fe49ea80fd4b5fe 100 os-core diff --git a/test/functional/update/use-pack/web-dir/100/Manifest.os-core b/test/functional/update/use-pack/web-dir/100/Manifest.os-core deleted file mode 100644 index fd0680b1..00000000 --- a/test/functional/update/use-pack/web-dir/100/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 100 /usr/bin diff --git a/test/functional/update/use-pack/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/update/use-pack/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/update/use-pack/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/update/use-pack/web-dir/version/formatstaging/latest b/test/functional/update/use-pack/web-dir/version/formatstaging/latest deleted file mode 100644 index 29d6383b..00000000 --- a/test/functional/update/use-pack/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/test/functional/update/verify-fix-path-hash-mismatch/lines-checked b/test/functional/update/verify-fix-path-hash-mismatch/lines-checked deleted file mode 100644 index 39fbd89d..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/lines-checked +++ /dev/null @@ -1,19 +0,0 @@ -Update started. -Preparing to update from 10 to 100 -Statistics for going from version 10 to version 100: - changed bundles : 1 - new bundles : 0 - deleted bundles : 0 - changed files : 1 - new files : 0 - deleted files : 0 -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Staging file content -REGEXP:^Update target directory does not exist: .*/target-dir/usr/bin. Trying to fix it$ -Hash did not match for path : /usr ... fixing -Path /usr/bin is missing on the file system ... fixing -Applying update -Update was applied. -1 files were not in a pack -Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/lib/os-release b/test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/share/clear/bundles/os-core b/test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/share/clear/bundles/os-core deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/share/clear/bundles/test-bundle b/test/functional/update/verify-fix-path-hash-mismatch/target-dir/usr/share/clear/bundles/test-bundle deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/update/verify-fix-path-hash-mismatch/test.bats b/test/functional/update/verify-fix-path-hash-mismatch/test.bats deleted file mode 100755 index 6682b2a7..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/test.bats +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -f1=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e -f2=520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 10 test-bundle - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 test-bundle - create_fullfile_tar 10 $f1 - create_fullfile_tar 100 $f2 -} - -teardown() { - clean_tars 10 - clean_tars 100 - clean_tars 10 files - clean_tars 100 files - revert_chown_root "$DIR/web-dir/10/files/$f1" - revert_chown_root "$DIR/web-dir/100/files/$f2" - revert_chown_root "$DIR/target-dir/usr" - sudo rm "$DIR/target-dir/usr/bin/foo" - sudo rmdir "$DIR/target-dir/usr/bin" -} - -@test "update verify_fix_path corrects hash mismatch" { - run sudo sh -c "$SWUPD update $SWUPD_OPTS" - - [ "$status" -eq 0 ] - check_lines "$output" - [ -d "$DIR/target-dir/usr/bin" ] - [ -f "$DIR/target-dir/usr/bin/foo" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.MoM b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.MoM deleted file mode 100644 index d229f5df..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 2 -timestamp: 1451940175 -contentsize: 0 - -M... 94ffb3abc2ea498ab1d1d340535658d5adc46adedfa545a6ae8c94d4e68042e3 10 os-core -M... f9ffe32682a49972d33d0d2df9dd377cc6ba6413af876b2280d946ee5a5e50e8 10 test-bundle diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.os-core b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.os-core deleted file mode 100644 index c8d66a2f..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.test-bundle b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.test-bundle deleted file mode 100644 index 1847abd3..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/Manifest.test-bundle +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 2 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin -F... ddff5e545287e632581b82e371de5d4aac2c7eb50d7f357f3b66fb0fdca71dd9 10 /usr/bin/foo diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.MoM b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.MoM deleted file mode 100644 index d93282bf..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 0 -filecount: 2 -timestamp: 1451940175 -contentsize: 0 - -M... 94ffb3abc2ea498ab1d1d340535658d5adc46adedfa545a6ae8c94d4e68042e3 10 os-core -M... c18a84af84a01d15470bc2afb85d546d7f500685a224749d3fa787e25ccc338e 100 test-bundle diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.test-bundle b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.test-bundle deleted file mode 100644 index d3d99692..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/Manifest.test-bundle +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 0 -filecount: 2 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin -F... 520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 100 /usr/bin/foo diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 deleted file mode 100644 index 9f4b6d8b..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 +++ /dev/null @@ -1 +0,0 @@ -This is a test file diff --git a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/version/formatstaging/latest b/test/functional/update/verify-fix-path-hash-mismatch/web-dir/version/formatstaging/latest deleted file mode 100644 index 29d6383b..00000000 --- a/test/functional/update/verify-fix-path-hash-mismatch/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/test/functional/update/verify-fix-path-missing-dir/lines-checked b/test/functional/update/verify-fix-path-missing-dir/lines-checked deleted file mode 100644 index 1758bdc7..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/lines-checked +++ /dev/null @@ -1,18 +0,0 @@ -Update started. -Preparing to update from 10 to 100 -Statistics for going from version 10 to version 100: - changed bundles : 1 - new bundles : 0 - deleted bundles : 0 - changed files : 1 - new files : 0 - deleted files : 0 -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Staging file content -REGEXP:^Update target directory does not exist: .*/target-dir/usr/bin. Trying to fix it$ -Path /usr/bin is missing on the file system ... fixing -Applying update -Update was applied. -1 files were not in a pack -Update successful. System updated from version 10 to version 100 diff --git a/test/functional/update/verify-fix-path-missing-dir/target-dir/usr/lib/os-release b/test/functional/update/verify-fix-path-missing-dir/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/update/verify-fix-path-missing-dir/target-dir/usr/share/clear/bundles/os-core b/test/functional/update/verify-fix-path-missing-dir/target-dir/usr/share/clear/bundles/os-core deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/update/verify-fix-path-missing-dir/target-dir/usr/share/clear/bundles/test-bundle b/test/functional/update/verify-fix-path-missing-dir/target-dir/usr/share/clear/bundles/test-bundle deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/update/verify-fix-path-missing-dir/test.bats b/test/functional/update/verify-fix-path-missing-dir/test.bats deleted file mode 100755 index babfcb06..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/test.bats +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -f1=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e -f2=520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 - -setup() { - clean_test_dir - - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 10 test-bundle - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 test-bundle - - chown_root "$DIR/target-dir/usr" - sudo chmod 755 "$DIR/target-dir/usr" - - create_fullfile_tar 10 $f1 - create_fullfile_tar 100 $f2 -} - -teardown() { - clean_tars 10 - clean_tars 100 - clean_tars 10 files - clean_tars 100 files - revert_chown_root "$DIR/web-dir/10/files/$f1" - revert_chown_root "$DIR/web-dir/100/files/$f2" - revert_chown_root "$DIR/target-dir/usr" - sudo rm "$DIR/target-dir/usr/bin/foo" - sudo rmdir "$DIR/target-dir/usr/bin" -} - -@test "update verify_fix_path corrects missing directory" { - run sudo sh -c "$SWUPD update $SWUPD_OPTS" - - [ "$status" -eq 0 ] - check_lines "$output" - [ -d "$DIR/target-dir/usr/bin" ] - [ -f "$DIR/target-dir/usr/bin/foo" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.MoM b/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.MoM deleted file mode 100644 index d229f5df..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 2 -timestamp: 1451940175 -contentsize: 0 - -M... 94ffb3abc2ea498ab1d1d340535658d5adc46adedfa545a6ae8c94d4e68042e3 10 os-core -M... f9ffe32682a49972d33d0d2df9dd377cc6ba6413af876b2280d946ee5a5e50e8 10 test-bundle diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.os-core b/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.os-core deleted file mode 100644 index c8d66a2f..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.test-bundle b/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.test-bundle deleted file mode 100644 index 1847abd3..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/Manifest.test-bundle +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 2 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin -F... ddff5e545287e632581b82e371de5d4aac2c7eb50d7f357f3b66fb0fdca71dd9 10 /usr/bin/foo diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/update/verify-fix-path-missing-dir/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.MoM b/test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.MoM deleted file mode 100644 index d93282bf..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 0 -filecount: 2 -timestamp: 1451940175 -contentsize: 0 - -M... 94ffb3abc2ea498ab1d1d340535658d5adc46adedfa545a6ae8c94d4e68042e3 10 os-core -M... c18a84af84a01d15470bc2afb85d546d7f500685a224749d3fa787e25ccc338e 100 test-bundle diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.test-bundle b/test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.test-bundle deleted file mode 100644 index d3d99692..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/100/Manifest.test-bundle +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 0 -filecount: 2 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin -F... 520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 100 /usr/bin/foo diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 b/test/functional/update/verify-fix-path-missing-dir/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 deleted file mode 100644 index 9f4b6d8b..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 +++ /dev/null @@ -1 +0,0 @@ -This is a test file diff --git a/test/functional/update/verify-fix-path-missing-dir/web-dir/version/formatstaging/latest b/test/functional/update/verify-fix-path-missing-dir/web-dir/version/formatstaging/latest deleted file mode 100644 index 29d6383b..00000000 --- a/test/functional/update/verify-fix-path-missing-dir/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/test/functional/update/verify-fullfile-hash/lines-checked b/test/functional/update/verify-fullfile-hash/lines-checked deleted file mode 100644 index 438b9b94..00000000 --- a/test/functional/update/verify-fullfile-hash/lines-checked +++ /dev/null @@ -1,12 +0,0 @@ -Update started. -Preparing to update from 10 to 100 -Statistics for going from version 10 to version 100: - changed bundles : 1 - new bundles : 0 - deleted bundles : 0 - changed files : 1 - new files : 0 - deleted files : 0 -Starting download of remaining update content. This may take a while... -Finishing download of update content... -REGEXP:Error: File content hash mismatch for .*/staged/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 \(bad server data\?\) diff --git a/test/functional/update/verify-fullfile-hash/target-dir/usr/lib/os-release b/test/functional/update/verify-fullfile-hash/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/update/verify-fullfile-hash/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/update/verify-fullfile-hash/target-dir/usr/share/clear/bundles/os-core b/test/functional/update/verify-fullfile-hash/target-dir/usr/share/clear/bundles/os-core deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/update/verify-fullfile-hash/target-dir/usr/share/clear/bundles/test-bundle b/test/functional/update/verify-fullfile-hash/target-dir/usr/share/clear/bundles/test-bundle deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/update/verify-fullfile-hash/test.bats b/test/functional/update/verify-fullfile-hash/test.bats deleted file mode 100755 index c82ecbb4..00000000 --- a/test/functional/update/verify-fullfile-hash/test.bats +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -f1=520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 10 test-bundle - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 test-bundle - create_fullfile_tar 100 $f1 -} - -teardown() { - clean_tars 10 - clean_tars 100 - clean_tars 100 files - revert_chown_root "$DIR/web-dir/100/files/$f1" -} - -@test "update fullfile hashes verified" { - run sudo sh -c "$SWUPD update $SWUPD_OPTS" - - [ "$status" -eq 1 ] - check_lines "$output" - - [ ! -f "$DIR/target-dir/foo" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.MoM b/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.MoM deleted file mode 100644 index 08470c44..00000000 --- a/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 2 -timestamp: 1451940175 -contentsize: 0 - -M... 1d951049819a561cafa046f5350511d6a132f0e821c342ebe23908911888d01f 10 os-core -M... 2730b7c921c6bf891f47c3f46a4b410ee15f7f864151e436c137723a357875ba 10 test-bundle diff --git a/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.os-core b/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.os-core deleted file mode 100644 index 410ebbfc..00000000 --- a/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... cde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr diff --git a/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.test-bundle b/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.test-bundle deleted file mode 100644 index ab8cf3c6..00000000 --- a/test/functional/update/verify-fullfile-hash/web-dir/10/Manifest.test-bundle +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 2 -timestamp: 1451936779 -contentsize: 17929151 - -F... ddff5e545287e632581b82e371de5d4aac2c7eb50d7f357f3b66fb0fdca71dd9 10 /foo diff --git a/test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.MoM b/test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.MoM deleted file mode 100644 index ed3aaa52..00000000 --- a/test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 0 -filecount: 2 -timestamp: 1451940175 -contentsize: 0 - -M... 1d951049819a561cafa046f5350511d6a132f0e821c342ebe23908911888d01f 10 os-core -M... fb3b6bc74f3813f031deae78679dbde15a81b4b755a8dc247e6ad13da6968689 100 test-bundle diff --git a/test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.test-bundle b/test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.test-bundle deleted file mode 100644 index e40ee9aa..00000000 --- a/test/functional/update/verify-fullfile-hash/web-dir/100/Manifest.test-bundle +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 0 -filecount: 2 -timestamp: 1451936779 -contentsize: 17929151 - -F... 520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 100 /foo diff --git a/test/functional/update/verify-fullfile-hash/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 b/test/functional/update/verify-fullfile-hash/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 deleted file mode 100644 index 257cc564..00000000 --- a/test/functional/update/verify-fullfile-hash/web-dir/100/files/520f83440d3dddc25ad09ca858b9c669245f82d3181a45cdfe793aac9dd1fb15 +++ /dev/null @@ -1 +0,0 @@ -foo diff --git a/test/functional/update/verify-fullfile-hash/web-dir/version/formatstaging/latest b/test/functional/update/verify-fullfile-hash/web-dir/version/formatstaging/latest deleted file mode 100644 index 29d6383b..00000000 --- a/test/functional/update/verify-fullfile-hash/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/test/functional/verify/add-missing-directory/lines-checked b/test/functional/verify/add-missing-directory/lines-checked deleted file mode 100644 index 3c8f0678..00000000 --- a/test/functional/verify/add-missing-directory/lines-checked +++ /dev/null @@ -1,14 +0,0 @@ -Verifying version 10 -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -REGEXP:^Missing file: .*/target-dir/usr/bin$ - fixed -Fixing modified files -Inspected 1 files - 1 files were missing - 1 of 1 missing files were replaced - 0 of 1 missing files were not replaced - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/add-missing-directory/target-dir/usr/lib/os-release b/test/functional/verify/add-missing-directory/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/add-missing-directory/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/add-missing-directory/test.bats b/test/functional/verify/add-missing-directory/test.bats deleted file mode 100755 index b750d68e..00000000 --- a/test/functional/verify/add-missing-directory/test.bats +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_fullfile_tar 10 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - sudo rmdir "$DIR/target-dir/usr/bin/" -} - -@test "verify add missing directory" { - run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" - - check_lines "$output" - [ -d "$DIR/target-dir/usr/bin" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/add-missing-directory/web-dir/10/Manifest.MoM b/test/functional/verify/add-missing-directory/web-dir/10/Manifest.MoM deleted file mode 100644 index 2800a174..00000000 --- a/test/functional/verify/add-missing-directory/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 1bf200ad0db7009656842c8b1751be4b6b4e3956d7a53065d45e289356792cb1 10 os-core diff --git a/test/functional/verify/add-missing-directory/web-dir/10/Manifest.os-core b/test/functional/verify/add-missing-directory/web-dir/10/Manifest.os-core deleted file mode 100644 index 7179a140..00000000 --- a/test/functional/verify/add-missing-directory/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin diff --git a/test/functional/verify/add-missing-directory/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/add-missing-directory/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/add-missing-directory/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/add-missing-directory/web-dir/version/formatstaging/latest b/test/functional/verify/add-missing-directory/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/add-missing-directory/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/add-missing-include-old/lines-checked b/test/functional/verify/add-missing-include-old/lines-checked deleted file mode 100644 index 03934f8c..00000000 --- a/test/functional/verify/add-missing-include-old/lines-checked +++ /dev/null @@ -1,18 +0,0 @@ -Verifying version 100 -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -REGEXP:^Missing file: .*/target-dir/os-core$ - fixed -REGEXP:^Missing file: .*/target-dir/test-bundle1$ - fixed -REGEXP:^Missing file: .*/target-dir/test-bundle2$ - fixed -Fixing modified files -Inspected 3 files - 3 files were missing - 3 of 3 missing files were replaced - 0 of 3 missing files were not replaced - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/add-missing-include-old/target-dir/usr/lib/os-release b/test/functional/verify/add-missing-include-old/target-dir/usr/lib/os-release deleted file mode 100644 index e65580ca..00000000 --- a/test/functional/verify/add-missing-include-old/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=100 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/add-missing-include-old/target-dir/usr/share/clear/bundles/os-core b/test/functional/verify/add-missing-include-old/target-dir/usr/share/clear/bundles/os-core deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/verify/add-missing-include-old/target-dir/usr/share/clear/bundles/test-bundle1 b/test/functional/verify/add-missing-include-old/target-dir/usr/share/clear/bundles/test-bundle1 deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/verify/add-missing-include-old/test.bats b/test/functional/verify/add-missing-include-old/test.bats deleted file mode 100755 index f8b9cb1b..00000000 --- a/test/functional/verify/add-missing-include-old/test.bats +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -f1=491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 -f2=826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 -f3=a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 10 test-bundle1 - create_manifest_tar 10 test-bundle2 - create_fullfile_tar 10 $f1 - - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 os-core - create_manifest_tar 100 test-bundle1 - create_fullfile_tar 100 $f2 - create_fullfile_tar 100 $f3 -} - -teardown() { - clean_tars 10 - clean_tars 10 files - clean_tars 100 - clean_tars files - revert_chown_root "$DIR/web-dir/10/files/$f1" - revert_chown_root "$DIR/web-dir/100/files/$f2" - revert_chown_root "$DIR/web-dir/100/files/$f3" - sudo rm "$DIR/target-dir/os-core" - sudo rm "$DIR/target-dir/test-bundle1" - sudo rm "$DIR/target-dir/test-bundle2" -} - -@test "verify add missing old include" { - run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" - - check_lines "$output" - [ -f "$DIR/target-dir/os-core" ] - [ -f "$DIR/target-dir/test-bundle1" ] - [ -f "$DIR/target-dir/test-bundle2" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.MoM b/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.MoM deleted file mode 100644 index 89d019b5..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,10 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 580f053aa17496cf73a8d579efd4f9fe3af5648b955c2543ec29b88ea467b8ef 10 os-core -M... 98280dd551d2240379a523538b7eb774c72e9685085f77f2ed51b1d966ef172c 10 test-bundle1 -M... 7850d639166a2a7e166b1150448b80f39296c811c9a899e2823433e094322deb 10 test-bundle2 diff --git a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.os-core b/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.os-core deleted file mode 100644 index 99ba6914..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -F... dead4952523cf67d92b9f4f03057ca1bf6e1ff018104f7f7ad27d5d4fb38b9ad 10 /os-core diff --git a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle1 b/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle1 deleted file mode 100644 index 614d8d8d..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle1 +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 -includes: os-core - -F... dead955d9952c3fcb2241b0f8d225205a5861cec9757b3a075d34810da9b08af 10 /test-bundle1 diff --git a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle2 b/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle2 deleted file mode 100644 index 280b8ad6..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/10/Manifest.test-bundle2 +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 -includes: os-core - -F... 491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 10 /test-bundle2 diff --git a/test/functional/verify/add-missing-include-old/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 b/test/functional/verify/add-missing-include-old/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 deleted file mode 100644 index be15e407..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 +++ /dev/null @@ -1 +0,0 @@ -test-bundle2 diff --git a/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.MoM b/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.MoM deleted file mode 100644 index a60984b7..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,10 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 88d187e20077ac674ee02a0f2bdc5da780ee2eceb23a341ddeb50e35f9d423f6 100 os-core -M... fd21b17f85529035177e0b97bb97b0466cf3f9f741459ecd46249ad4f2f0dc12 100 test-bundle1 -M... 7850d639166a2a7e166b1150448b80f39296c811c9a899e2823433e094322deb 10 test-bundle2 diff --git a/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.os-core b/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.os-core deleted file mode 100644 index 3fc933f0..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -F... 826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 100 /os-core diff --git a/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.test-bundle1 b/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.test-bundle1 deleted file mode 100644 index 64f8c2e3..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/100/Manifest.test-bundle1 +++ /dev/null @@ -1,10 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 -includes: os-core -includes: test-bundle2 - -F... a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 100 /test-bundle1 diff --git a/test/functional/verify/add-missing-include-old/web-dir/100/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 b/test/functional/verify/add-missing-include-old/web-dir/100/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 deleted file mode 100644 index 34e0b5e6..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/100/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 +++ /dev/null @@ -1 +0,0 @@ -os-core diff --git a/test/functional/verify/add-missing-include-old/web-dir/100/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 b/test/functional/verify/add-missing-include-old/web-dir/100/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 deleted file mode 100644 index 639db438..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/100/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 +++ /dev/null @@ -1 +0,0 @@ -test-bundle1 diff --git a/test/functional/verify/add-missing-include-old/web-dir/version/formatstaging/latest b/test/functional/verify/add-missing-include-old/web-dir/version/formatstaging/latest deleted file mode 100644 index 29d6383b..00000000 --- a/test/functional/verify/add-missing-include-old/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/test/functional/verify/add-missing-include/lines-checked b/test/functional/verify/add-missing-include/lines-checked deleted file mode 100644 index 5a16afb0..00000000 --- a/test/functional/verify/add-missing-include/lines-checked +++ /dev/null @@ -1,18 +0,0 @@ -Verifying version 10 -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -REGEXP:^Missing file: .*/target-dir/os-core$ - fixed -REGEXP:^Missing file: .*/target-dir/test-bundle1$ - fixed -REGEXP:^Missing file: .*/target-dir/test-bundle2$ - fixed -Fixing modified files -Inspected 3 files - 3 files were missing - 3 of 3 missing files were replaced - 0 of 3 missing files were not replaced - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/add-missing-include/target-dir/usr/lib/os-release b/test/functional/verify/add-missing-include/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/add-missing-include/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/add-missing-include/target-dir/usr/share/clear/bundles/os-core b/test/functional/verify/add-missing-include/target-dir/usr/share/clear/bundles/os-core deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/verify/add-missing-include/target-dir/usr/share/clear/bundles/test-bundle1 b/test/functional/verify/add-missing-include/target-dir/usr/share/clear/bundles/test-bundle1 deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/verify/add-missing-include/test.bats b/test/functional/verify/add-missing-include/test.bats deleted file mode 100755 index 6f4a5654..00000000 --- a/test/functional/verify/add-missing-include/test.bats +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -f1=491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 -f2=826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 -f3=a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_manifest_tar 10 test-bundle1 - create_manifest_tar 10 test-bundle2 - create_fullfile_tar 10 $f1 - create_fullfile_tar 10 $f2 - create_fullfile_tar 10 $f3 -} - -teardown() { - clean_tars 10 - clean_tars files - revert_chown_root "$DIR/web-dir/10/files/$f1" - revert_chown_root "$DIR/web-dir/10/files/$f2" - revert_chown_root "$DIR/web-dir/10/files/$f3" - sudo rm "$DIR/target-dir/os-core" - sudo rm "$DIR/target-dir/test-bundle1" - sudo rm "$DIR/target-dir/test-bundle2" -} - -@test "verify add missing include" { - run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" - - check_lines "$output" - [ -f "$DIR/target-dir/os-core" ] - [ -f "$DIR/target-dir/test-bundle1" ] - [ -f "$DIR/target-dir/test-bundle2" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/add-missing-include/web-dir/10/Manifest.MoM b/test/functional/verify/add-missing-include/web-dir/10/Manifest.MoM deleted file mode 100644 index 022da4da..00000000 --- a/test/functional/verify/add-missing-include/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,10 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... bfabc9318be87606f2aa5a5e65f5b24f5e8442034059bcfbc142e68a6e37c087 10 os-core -M... c81e327a64d514f7559762e3fafc1e7be832f1717563b4c94e218c1c14ec95e7 10 test-bundle1 -M... 7850d639166a2a7e166b1150448b80f39296c811c9a899e2823433e094322deb 10 test-bundle2 diff --git a/test/functional/verify/add-missing-include/web-dir/10/Manifest.os-core b/test/functional/verify/add-missing-include/web-dir/10/Manifest.os-core deleted file mode 100644 index 9d29f5d7..00000000 --- a/test/functional/verify/add-missing-include/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -F... 826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 10 /os-core diff --git a/test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle1 b/test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle1 deleted file mode 100644 index f82653e7..00000000 --- a/test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle1 +++ /dev/null @@ -1,10 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 -includes: os-core -includes: test-bundle2 - -F... a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 10 /test-bundle1 diff --git a/test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle2 b/test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle2 deleted file mode 100644 index 280b8ad6..00000000 --- a/test/functional/verify/add-missing-include/web-dir/10/Manifest.test-bundle2 +++ /dev/null @@ -1,9 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 -includes: os-core - -F... 491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 10 /test-bundle2 diff --git a/test/functional/verify/add-missing-include/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 b/test/functional/verify/add-missing-include/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 deleted file mode 100644 index be15e407..00000000 --- a/test/functional/verify/add-missing-include/web-dir/10/files/491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 +++ /dev/null @@ -1 +0,0 @@ -test-bundle2 diff --git a/test/functional/verify/add-missing-include/web-dir/10/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 b/test/functional/verify/add-missing-include/web-dir/10/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 deleted file mode 100644 index 34e0b5e6..00000000 --- a/test/functional/verify/add-missing-include/web-dir/10/files/826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 +++ /dev/null @@ -1 +0,0 @@ -os-core diff --git a/test/functional/verify/add-missing-include/web-dir/10/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 b/test/functional/verify/add-missing-include/web-dir/10/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 deleted file mode 100644 index 639db438..00000000 --- a/test/functional/verify/add-missing-include/web-dir/10/files/a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 +++ /dev/null @@ -1 +0,0 @@ -test-bundle1 diff --git a/test/functional/verify/add-missing-include/web-dir/version/formatstaging/latest b/test/functional/verify/add-missing-include/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/add-missing-include/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/boot-file-deleted/lines-checked b/test/functional/verify/boot-file-deleted/lines-checked deleted file mode 100644 index 2a2339dc..00000000 --- a/test/functional/verify/boot-file-deleted/lines-checked +++ /dev/null @@ -1,8 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -Inspected 0 files - 0 files were missing - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/boot-file-deleted/target-dir/usr/lib/kernel/testfile b/test/functional/verify/boot-file-deleted/target-dir/usr/lib/kernel/testfile deleted file mode 100644 index 1304258b..00000000 --- a/test/functional/verify/boot-file-deleted/target-dir/usr/lib/kernel/testfile +++ /dev/null @@ -1 +0,0 @@ -test boot file diff --git a/test/functional/verify/boot-file-deleted/target-dir/usr/lib/os-release b/test/functional/verify/boot-file-deleted/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/boot-file-deleted/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/boot-file-deleted/test.bats b/test/functional/verify/boot-file-deleted/test.bats deleted file mode 100755 index 11560fa4..00000000 --- a/test/functional/verify/boot-file-deleted/test.bats +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root "$DIR/target-dir/usr/lib/kernel/testfile" - create_fullfile_tar 10 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - sudo rm "$DIR/target-dir/usr/lib/kernel/testfile" - cp "$DIR/web-dir/10/files/$targetfile" "$DIR/target-dir/usr/lib/kernel/testfile" -} - -@test "verify add missing boot file" { - run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" - - check_lines "$output" - [ -f "$DIR/target-dir/usr/lib/kernel/testfile" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/boot-file-deleted/web-dir/10/Manifest.MoM b/test/functional/verify/boot-file-deleted/web-dir/10/Manifest.MoM deleted file mode 100644 index 56a3851b..00000000 --- a/test/functional/verify/boot-file-deleted/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 06ded0bcfc48624ccade8ac4ce3ec5fe127d49fe2b0f0152e7c25fd0f0f5d46d 10 os-core diff --git a/test/functional/verify/boot-file-deleted/web-dir/10/Manifest.os-core b/test/functional/verify/boot-file-deleted/web-dir/10/Manifest.os-core deleted file mode 100644 index 7a1fb778..00000000 --- a/test/functional/verify/boot-file-deleted/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -.db. 0000000000000000000000000000000000000000000000000000000000000000 10 /usr/lib/kernel/testfile diff --git a/test/functional/verify/boot-file-deleted/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 b/test/functional/verify/boot-file-deleted/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 deleted file mode 100644 index 1304258b..00000000 --- a/test/functional/verify/boot-file-deleted/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 +++ /dev/null @@ -1 +0,0 @@ -test boot file diff --git a/test/functional/verify/boot-file-deleted/web-dir/version/formatstaging/latest b/test/functional/verify/boot-file-deleted/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/boot-file-deleted/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/boot-file-mismatch-fix/lines-checked b/test/functional/verify/boot-file-mismatch-fix/lines-checked deleted file mode 100644 index acd1b5f9..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/lines-checked +++ /dev/null @@ -1,15 +0,0 @@ -Verifying version 10 -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -Fixing modified files -REGEXP:^Hash mismatch for file: .*/target-dir/usr/lib/kernel/testfile$ - fixed -Inspected 1 files - 0 files were missing - 1 files did not match - 1 of 1 files were fixed - 0 of 1 files were not fixed - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile b/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile deleted file mode 100644 index bcc82759..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile +++ /dev/null @@ -1 +0,0 @@ -**CORRUPT!** test boot file diff --git a/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile.backup b/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile.backup deleted file mode 100644 index bcc82759..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/kernel/testfile.backup +++ /dev/null @@ -1 +0,0 @@ -**CORRUPT!** test boot file diff --git a/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/os-release b/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/boot-file-mismatch-fix/test.bats b/test/functional/verify/boot-file-mismatch-fix/test.bats deleted file mode 100755 index 73cb225e..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/test.bats +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root "$DIR/target-dir/usr/lib/kernel/testfile" - create_fullfile_tar 10 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - sudo rm "$DIR/target-dir/usr/lib/kernel/testfile" - cp "$DIR/target-dir/usr/lib/kernel/testfile.backup" "$DIR/target-dir/usr/lib/kernel/testfile" -} - -@test "verify fix incorrect boot file" { - run sudo sh -c "$SWUPD verify $SWUPD_OPTS --fix" - - check_lines "$output" - [ -f "$DIR/target-dir/usr/lib/kernel/testfile" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.MoM b/test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.MoM deleted file mode 100644 index 6de33559..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 38ce8471091f595220345313378dd75b24cbb553805fb3f5fca9232c15cdcbcd 10 os-core diff --git a/test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.os-core b/test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.os-core deleted file mode 100644 index 0c08ba20..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -F.b. e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 10 /usr/lib/kernel/testfile diff --git a/test/functional/verify/boot-file-mismatch-fix/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 b/test/functional/verify/boot-file-mismatch-fix/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 deleted file mode 100644 index 1304258b..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 +++ /dev/null @@ -1 +0,0 @@ -test boot file diff --git a/test/functional/verify/boot-file-mismatch-fix/web-dir/version/formatstaging/latest b/test/functional/verify/boot-file-mismatch-fix/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/boot-file-mismatch-fix/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/boot-file-mismatch/lines-checked b/test/functional/verify/boot-file-mismatch/lines-checked deleted file mode 100644 index 15b1df25..00000000 --- a/test/functional/verify/boot-file-mismatch/lines-checked +++ /dev/null @@ -1,6 +0,0 @@ -Verifying version 10 -Verifying files -REGEXP:^Hash mismatch for file: .*/target-dir/usr/lib/kernel/testfile$ -Inspected 1 files - 1 files did not match -Verify successful diff --git a/test/functional/verify/boot-file-mismatch/target-dir/usr/lib/kernel/testfile b/test/functional/verify/boot-file-mismatch/target-dir/usr/lib/kernel/testfile deleted file mode 100644 index bcc82759..00000000 --- a/test/functional/verify/boot-file-mismatch/target-dir/usr/lib/kernel/testfile +++ /dev/null @@ -1 +0,0 @@ -**CORRUPT!** test boot file diff --git a/test/functional/verify/boot-file-mismatch/target-dir/usr/lib/os-release b/test/functional/verify/boot-file-mismatch/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/boot-file-mismatch/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/boot-file-mismatch/test.bats b/test/functional/verify/boot-file-mismatch/test.bats deleted file mode 100755 index ff34efa0..00000000 --- a/test/functional/verify/boot-file-mismatch/test.bats +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root "$DIR/target-dir/usr/lib/kernel/testfile" -} - -teardown() { - clean_tars 10 - revert_chown_root "$DIR/target-dir/usr/lib/kernel/testfile" -} - -@test "verify check incorrect boot file" { - run sudo sh -c "$SWUPD verify $SWUPD_OPTS" - - check_lines "$output" - [ -f "$DIR/target-dir/usr/lib/kernel/testfile" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.MoM b/test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.MoM deleted file mode 100644 index 6de33559..00000000 --- a/test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 38ce8471091f595220345313378dd75b24cbb553805fb3f5fca9232c15cdcbcd 10 os-core diff --git a/test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.os-core b/test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.os-core deleted file mode 100644 index 0c08ba20..00000000 --- a/test/functional/verify/boot-file-mismatch/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -F.b. e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 10 /usr/lib/kernel/testfile diff --git a/test/functional/verify/boot-file-mismatch/web-dir/version/formatstaging/latest b/test/functional/verify/boot-file-mismatch/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/boot-file-mismatch/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/boot-skip/lines-checked b/test/functional/verify/boot-skip/lines-checked deleted file mode 100644 index ef25324a..00000000 --- a/test/functional/verify/boot-skip/lines-checked +++ /dev/null @@ -1,9 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -Inspected 0 files - 0 files were missing - 0 files found which should be deleted -WARNING: boot files update skipped due to --no-boot-update argument -Fix successful diff --git a/test/functional/verify/boot-skip/target-dir/usr/lib/kernel/testfile b/test/functional/verify/boot-skip/target-dir/usr/lib/kernel/testfile deleted file mode 100644 index 1304258b..00000000 --- a/test/functional/verify/boot-skip/target-dir/usr/lib/kernel/testfile +++ /dev/null @@ -1 +0,0 @@ -test boot file diff --git a/test/functional/verify/boot-skip/target-dir/usr/lib/os-release b/test/functional/verify/boot-skip/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/boot-skip/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/boot-skip/test.bats b/test/functional/verify/boot-skip/test.bats deleted file mode 100755 index fc798b3b..00000000 --- a/test/functional/verify/boot-skip/test.bats +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root "$DIR/target-dir/usr/lib/kernel/testfile" - create_fullfile_tar 10 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - sudo rm "$DIR/target-dir/usr/lib/kernel/testfile" - cp "$DIR/web-dir/10/files/$targetfile" "$DIR/target-dir/usr/lib/kernel/testfile" -} - -@test "verify override boot update" { - run sudo sh -c "$SWUPD verify --fix -b $SWUPD_OPTS" - - check_lines "$output" - # this should exist at the end, even if cbm is not run - [ -f "$DIR/target-dir/usr/lib/kernel/testfile" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/boot-skip/web-dir/10/Manifest.MoM b/test/functional/verify/boot-skip/web-dir/10/Manifest.MoM deleted file mode 100644 index 56a3851b..00000000 --- a/test/functional/verify/boot-skip/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 06ded0bcfc48624ccade8ac4ce3ec5fe127d49fe2b0f0152e7c25fd0f0f5d46d 10 os-core diff --git a/test/functional/verify/boot-skip/web-dir/10/Manifest.os-core b/test/functional/verify/boot-skip/web-dir/10/Manifest.os-core deleted file mode 100644 index 7a1fb778..00000000 --- a/test/functional/verify/boot-skip/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -.db. 0000000000000000000000000000000000000000000000000000000000000000 10 /usr/lib/kernel/testfile diff --git a/test/functional/verify/boot-skip/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 b/test/functional/verify/boot-skip/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 deleted file mode 100644 index 1304258b..00000000 --- a/test/functional/verify/boot-skip/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 +++ /dev/null @@ -1 +0,0 @@ -test boot file diff --git a/test/functional/verify/boot-skip/web-dir/version/formatstaging/latest b/test/functional/verify/boot-skip/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/boot-skip/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/check-missing-directory/lines-checked b/test/functional/verify/check-missing-directory/lines-checked deleted file mode 100644 index 03265b40..00000000 --- a/test/functional/verify/check-missing-directory/lines-checked +++ /dev/null @@ -1,6 +0,0 @@ -Verifying version 10 -Verifying files -REGEXP:^Hash mismatch for file: .*/target-dir/usr/bin$ -Inspected 1 files - 1 files did not match -Verify successful diff --git a/test/functional/verify/check-missing-directory/target-dir/usr/lib/os-release b/test/functional/verify/check-missing-directory/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/check-missing-directory/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/check-missing-directory/test.bats b/test/functional/verify/check-missing-directory/test.bats deleted file mode 100755 index 65e2013f..00000000 --- a/test/functional/verify/check-missing-directory/test.bats +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core -} - -teardown() { - clean_tars 10 -} - -@test "verify check missing directory" { - run sudo sh -c "$SWUPD verify $SWUPD_OPTS" - - check_lines "$output" - [ ! -d "$DIR/target-dir/usr/bin" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/check-missing-directory/web-dir/10/Manifest.MoM b/test/functional/verify/check-missing-directory/web-dir/10/Manifest.MoM deleted file mode 100644 index 55b81a4e..00000000 --- a/test/functional/verify/check-missing-directory/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 060ef6ba332910822f942da6b242dcff297ff2dc0f0fb65c28a6ad70539709ba 10 os-core diff --git a/test/functional/verify/check-missing-directory/web-dir/10/Manifest.os-core b/test/functional/verify/check-missing-directory/web-dir/10/Manifest.os-core deleted file mode 100644 index 06f9e7f5..00000000 --- a/test/functional/verify/check-missing-directory/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 24d8955d9952c3fcb2241b0f8d225205a5861cec9757b3a075d34810da9b08af 10 /usr/bin diff --git a/test/functional/verify/check-missing-directory/web-dir/version/formatstaging/latest b/test/functional/verify/check-missing-directory/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/check-missing-directory/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/directory-tree-deleted/lines-checked b/test/functional/verify/directory-tree-deleted/lines-checked deleted file mode 100644 index 584a6709..00000000 --- a/test/functional/verify/directory-tree-deleted/lines-checked +++ /dev/null @@ -1,13 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -REGEXP:Deleted .*/target-dir/testdir1/testdir2/testfile -REGEXP:Deleted .*/target-dir/testdir1/testdir2 -REGEXP:Deleted .*/target-dir/testdir1 -Inspected 0 files - 0 files were missing - 3 files found which should be deleted - 3 of 3 files were deleted - 0 of 3 files were not deleted -Fix successful diff --git a/test/functional/verify/directory-tree-deleted/target-dir/testdir1/testdir2/testfile b/test/functional/verify/directory-tree-deleted/target-dir/testdir1/testdir2/testfile deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/verify/directory-tree-deleted/target-dir/usr/lib/os-release b/test/functional/verify/directory-tree-deleted/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/directory-tree-deleted/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/directory-tree-deleted/test.bats b/test/functional/verify/directory-tree-deleted/test.bats deleted file mode 100755 index 80c117b3..00000000 --- a/test/functional/verify/directory-tree-deleted/test.bats +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core -} - -teardown() { - clean_tars 10 - mkdir -p "$DIR/target-dir/testdir1/testdir2" - touch "$DIR/target-dir/testdir1/testdir2/testfile" -} - -@test "verify delete directory tree" { - run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" - - check_lines "$output" - [ ! -d "$DIR/target-dir/testdir1" ] - [ ! -d "$DIR/target-dir/testdir1/testdir2" ] - [ ! -f "$DIR/target-dir/testdir1/testdir2/testfile" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.MoM b/test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.MoM deleted file mode 100644 index e46285ab..00000000 --- a/test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... c37aba8f0cae36156d20cd88123bcfb43e3582cbf86eea3900df66d6a5f280c0 10 os-core diff --git a/test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.os-core b/test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.os-core deleted file mode 100644 index c170b807..00000000 --- a/test/functional/verify/directory-tree-deleted/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,10 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 3 -timestamp: 1451936779 -contentsize: 17929151 - -.d.. 0000000000000000000000000000000000000000000000000000000000000000 10 /testdir1 -.d.. 0000000000000000000000000000000000000000000000000000000000000000 10 /testdir1/testdir2 -.d.. 0000000000000000000000000000000000000000000000000000000000000000 10 /testdir1/testdir2/testfile diff --git a/test/functional/verify/directory-tree-deleted/web-dir/version/formatstaging/latest b/test/functional/verify/directory-tree-deleted/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/directory-tree-deleted/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/empty-dir-deleted/lines-checked b/test/functional/verify/empty-dir-deleted/lines-checked deleted file mode 100644 index 7e823a3f..00000000 --- a/test/functional/verify/empty-dir-deleted/lines-checked +++ /dev/null @@ -1,11 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -REGEXP:^Deleted .*/target-dir/testdir$ -Inspected 0 files - 0 files were missing - 1 files found which should be deleted - 1 of 1 files were deleted - 0 of 1 files were not deleted -Fix successful diff --git a/test/functional/verify/empty-dir-deleted/target-dir/testdir/.gitignore b/test/functional/verify/empty-dir-deleted/target-dir/testdir/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/test/functional/verify/empty-dir-deleted/target-dir/usr/lib/os-release b/test/functional/verify/empty-dir-deleted/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/empty-dir-deleted/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/empty-dir-deleted/test.bats b/test/functional/verify/empty-dir-deleted/test.bats deleted file mode 100755 index c6ae78a4..00000000 --- a/test/functional/verify/empty-dir-deleted/test.bats +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - rm "$DIR/target-dir/testdir/.gitignore" -} - -teardown() { - clean_tars 10 - mkdir -p "$DIR/target-dir/testdir" - touch "$DIR/target-dir/testdir/.gitignore" -} - -@test "verify delete already removed directory" { - run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" - - check_lines "$output" - [ ! -d "$DIR/target-dir/testdir" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.MoM b/test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.MoM deleted file mode 100644 index e1a85270..00000000 --- a/test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 35613f9da3a4fbbd875bdb51da54be0230e75a7b5e44d4f4fe1dd8a6b2912195 10 os-core diff --git a/test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.os-core b/test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.os-core deleted file mode 100644 index 35e09649..00000000 --- a/test/functional/verify/empty-dir-deleted/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -.d.. 0000000000000000000000000000000000000000000000000000000000000000 10 /testdir diff --git a/test/functional/verify/empty-dir-deleted/web-dir/version/formatstaging/latest b/test/functional/verify/empty-dir-deleted/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/empty-dir-deleted/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/fix-version-mismatch-override/lines-checked b/test/functional/verify/fix-version-mismatch-override/lines-checked deleted file mode 100644 index d1fba477..00000000 --- a/test/functional/verify/fix-version-mismatch-override/lines-checked +++ /dev/null @@ -1,15 +0,0 @@ -Verifying version 10 -WARNING: the force or picky option is specified; ignoring version mismatch for verify --fix -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -REGEXP:^Missing file: .+/target-dir/usr/bin$ - fixed -Fixing modified files -Inspected 1 files - 1 files were missing - 1 of 1 missing files were replaced - 0 of 1 missing files were not replaced - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/fix-version-mismatch-override/target-dir/usr/lib/os-release b/test/functional/verify/fix-version-mismatch-override/target-dir/usr/lib/os-release deleted file mode 100644 index 36f421bf..00000000 --- a/test/functional/verify/fix-version-mismatch-override/target-dir/usr/lib/os-release +++ /dev/null @@ -1 +0,0 @@ -VERSION_ID=20 diff --git a/test/functional/verify/fix-version-mismatch-override/test.bats b/test/functional/verify/fix-version-mismatch-override/test.bats deleted file mode 100755 index db69f069..00000000 --- a/test/functional/verify/fix-version-mismatch-override/test.bats +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_fullfile_tar 10 $targetfile - - create_manifest_tar 20 MoM - sign_manifest_mom 20 - create_manifest_tar 20 os-core - create_fullfile_tar 20 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - - clean_tars 20 - clean_tars 20 files - - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - revert_chown_root "$DIR/web-dir/20/files/$targetfile" - - # test should succeed and therefore install this dir - sudo rmdir "$DIR/target-dir/usr/bin/" -} - -@test "verify version mismatch override" { - run sudo sh -c "$SWUPD verify --fix -m 10 --force $SWUPD_OPTS" - - [ $status -eq 0 ] - check_lines "$output" -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.MoM b/test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.MoM deleted file mode 100644 index b4249a06..00000000 --- a/test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 1 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 15d53310ea1d80c7d0045b76081f5334afb99e53efd81579e07ef869b7ab790e 10 os-core diff --git a/test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.os-core b/test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.os-core deleted file mode 100644 index 1043b2a6..00000000 --- a/test/functional/verify/fix-version-mismatch-override/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 1 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin diff --git a/test/functional/verify/fix-version-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/fix-version-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/fix-version-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.MoM b/test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.MoM deleted file mode 100644 index 59cd0929..00000000 --- a/test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 3ba369029c1bbfd5888d090e107ce0f5cd7ed074143e466c171ca16064532dcc 20 os-core diff --git a/test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.os-core b/test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.os-core deleted file mode 100644 index 3e305184..00000000 --- a/test/functional/verify/fix-version-mismatch-override/web-dir/20/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 20 /usr/bin diff --git a/test/functional/verify/fix-version-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/fix-version-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/fix-version-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/fix-version-mismatch-override/web-dir/version/formatstaging/latest b/test/functional/verify/fix-version-mismatch-override/web-dir/version/formatstaging/latest deleted file mode 100644 index 209e3ef4..00000000 --- a/test/functional/verify/fix-version-mismatch-override/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/test/functional/verify/fix-version-mismatch/lines-checked b/test/functional/verify/fix-version-mismatch/lines-checked deleted file mode 100644 index 39044f20..00000000 --- a/test/functional/verify/fix-version-mismatch/lines-checked +++ /dev/null @@ -1,3 +0,0 @@ -Verifying version 10 -ERROR: Fixing to a different version requires --force or --picky -Error: Fix did not fully succeed diff --git a/test/functional/verify/fix-version-mismatch/target-dir/usr/lib/os-release b/test/functional/verify/fix-version-mismatch/target-dir/usr/lib/os-release deleted file mode 100644 index 36f421bf..00000000 --- a/test/functional/verify/fix-version-mismatch/target-dir/usr/lib/os-release +++ /dev/null @@ -1 +0,0 @@ -VERSION_ID=20 diff --git a/test/functional/verify/fix-version-mismatch/test.bats b/test/functional/verify/fix-version-mismatch/test.bats deleted file mode 100755 index 269aa4ec..00000000 --- a/test/functional/verify/fix-version-mismatch/test.bats +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - - create_manifest_tar 10 MoM - sign_manifest_mom 10 - - create_manifest_tar 20 MoM - sign_manifest_mom 20 - create_manifest_tar 20 os-core - create_fullfile_tar 20 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - - clean_tars 20 - clean_tars 20 files - - revert_chown_root "$DIR/web-dir/20/files/$targetfile" -} - -@test "verify version mismatch enforcement" { - run sudo sh -c "$SWUPD verify --fix -m 10 $SWUPD_OPTS" - - # 14 = EMANIFEST_LOAD - [ $status -eq 14 ] - check_lines "$output" -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/fix-version-mismatch/web-dir/10/Manifest.MoM b/test/functional/verify/fix-version-mismatch/web-dir/10/Manifest.MoM deleted file mode 100644 index b4249a06..00000000 --- a/test/functional/verify/fix-version-mismatch/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 1 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 15d53310ea1d80c7d0045b76081f5334afb99e53efd81579e07ef869b7ab790e 10 os-core diff --git a/test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.MoM b/test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.MoM deleted file mode 100644 index 59cd0929..00000000 --- a/test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 3ba369029c1bbfd5888d090e107ce0f5cd7ed074143e466c171ca16064532dcc 20 os-core diff --git a/test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.os-core b/test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.os-core deleted file mode 100644 index 3e305184..00000000 --- a/test/functional/verify/fix-version-mismatch/web-dir/20/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 20 /usr/bin diff --git a/test/functional/verify/fix-version-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/fix-version-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/fix-version-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/fix-version-mismatch/web-dir/version/formatstaging/latest b/test/functional/verify/fix-version-mismatch/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/fix-version-mismatch/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/format-mismatch-override/lines-checked b/test/functional/verify/format-mismatch-override/lines-checked deleted file mode 100644 index 6ff2e71a..00000000 --- a/test/functional/verify/format-mismatch-override/lines-checked +++ /dev/null @@ -1,16 +0,0 @@ -Verifying version 20 -WARNING: the force option is specified; ignoring format mismatch for verify -WARNING: the force or picky option is specified; ignoring version mismatch for verify --fix -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -REGEXP:^Missing file: .+/target-dir/usr/bin$ - fixed -Fixing modified files -Inspected 1 files - 1 files were missing - 1 of 1 missing files were replaced - 0 of 1 missing files were not replaced - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/format-mismatch-override/target-dir/usr/lib/os-release b/test/functional/verify/format-mismatch-override/target-dir/usr/lib/os-release deleted file mode 100644 index b01f31ec..00000000 --- a/test/functional/verify/format-mismatch-override/target-dir/usr/lib/os-release +++ /dev/null @@ -1 +0,0 @@ -VERSION_ID=10 diff --git a/test/functional/verify/format-mismatch-override/test.bats b/test/functional/verify/format-mismatch-override/test.bats deleted file mode 100755 index 33d2e303..00000000 --- a/test/functional/verify/format-mismatch-override/test.bats +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_fullfile_tar 10 $targetfile - - create_manifest_tar 20 MoM - sign_manifest_mom 20 - create_manifest_tar 20 os-core - create_fullfile_tar 20 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - - clean_tars 20 - clean_tars 20 files - - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - revert_chown_root "$DIR/web-dir/20/files/$targetfile" - - # test should succeed and therefore install this dir - sudo rmdir "$DIR/target-dir/usr/bin/" -} - -@test "verify format mismatch override" { - # the -x option bypasses the fatal error - run sudo sh -c "$SWUPD verify --fix -F 1 -m 20 -x $SWUPD_OPTS_NO_FMT" - - [ $status -eq 0 ] - check_lines "$output" -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/format-mismatch-override/web-dir/10/Manifest.MoM b/test/functional/verify/format-mismatch-override/web-dir/10/Manifest.MoM deleted file mode 100644 index b4249a06..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 1 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 15d53310ea1d80c7d0045b76081f5334afb99e53efd81579e07ef869b7ab790e 10 os-core diff --git a/test/functional/verify/format-mismatch-override/web-dir/10/Manifest.os-core b/test/functional/verify/format-mismatch-override/web-dir/10/Manifest.os-core deleted file mode 100644 index 1043b2a6..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 1 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin diff --git a/test/functional/verify/format-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/format-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/format-mismatch-override/web-dir/20/Manifest.MoM b/test/functional/verify/format-mismatch-override/web-dir/20/Manifest.MoM deleted file mode 100644 index 59cd0929..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/20/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 3ba369029c1bbfd5888d090e107ce0f5cd7ed074143e466c171ca16064532dcc 20 os-core diff --git a/test/functional/verify/format-mismatch-override/web-dir/20/Manifest.os-core b/test/functional/verify/format-mismatch-override/web-dir/20/Manifest.os-core deleted file mode 100644 index 3e305184..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/20/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 20 /usr/bin diff --git a/test/functional/verify/format-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/format-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/format-mismatch-override/web-dir/version/format1/latest b/test/functional/verify/format-mismatch-override/web-dir/version/format1/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/version/format1/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/format-mismatch-override/web-dir/version/format2/latest b/test/functional/verify/format-mismatch-override/web-dir/version/format2/latest deleted file mode 100644 index 209e3ef4..00000000 --- a/test/functional/verify/format-mismatch-override/web-dir/version/format2/latest +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/test/functional/verify/format-mismatch/lines-checked b/test/functional/verify/format-mismatch/lines-checked deleted file mode 100644 index e654d94d..00000000 --- a/test/functional/verify/format-mismatch/lines-checked +++ /dev/null @@ -1,4 +0,0 @@ -Verifying version 20 -ERROR: Mismatching formats detected when verifying 20 (expected: 1; actual: 2) -Latest supported version to verify: 10 -Error: Fix did not fully succeed diff --git a/test/functional/verify/format-mismatch/target-dir/usr/lib/os-release b/test/functional/verify/format-mismatch/target-dir/usr/lib/os-release deleted file mode 100644 index b01f31ec..00000000 --- a/test/functional/verify/format-mismatch/target-dir/usr/lib/os-release +++ /dev/null @@ -1 +0,0 @@ -VERSION_ID=10 diff --git a/test/functional/verify/format-mismatch/test.bats b/test/functional/verify/format-mismatch/test.bats deleted file mode 100755 index cad5c893..00000000 --- a/test/functional/verify/format-mismatch/test.bats +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - create_fullfile_tar 10 $targetfile - - create_manifest_tar 20 MoM - sign_manifest_mom 20 - create_manifest_tar 20 os-core - create_fullfile_tar 20 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - - clean_tars 20 - clean_tars 20 files - - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - revert_chown_root "$DIR/web-dir/20/files/$targetfile" - - #sudo rmdir "$DIR/target-dir/usr/bin/" -} - -@test "verify format mismatch enforcement" { - run sudo sh -c "$SWUPD verify --fix -F 1 -m 20 $SWUPD_OPTS_NO_FMT" - - # 14 = EMANIFEST_LOAD - [ $status -eq 14 ] - check_lines "$output" -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/format-mismatch/web-dir/10/Manifest.MoM b/test/functional/verify/format-mismatch/web-dir/10/Manifest.MoM deleted file mode 100644 index b4249a06..00000000 --- a/test/functional/verify/format-mismatch/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 1 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 15d53310ea1d80c7d0045b76081f5334afb99e53efd81579e07ef869b7ab790e 10 os-core diff --git a/test/functional/verify/format-mismatch/web-dir/10/Manifest.os-core b/test/functional/verify/format-mismatch/web-dir/10/Manifest.os-core deleted file mode 100644 index 1043b2a6..00000000 --- a/test/functional/verify/format-mismatch/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 1 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin diff --git a/test/functional/verify/format-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/format-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/format-mismatch/web-dir/10/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/format-mismatch/web-dir/20/Manifest.MoM b/test/functional/verify/format-mismatch/web-dir/20/Manifest.MoM deleted file mode 100644 index 59cd0929..00000000 --- a/test/functional/verify/format-mismatch/web-dir/20/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 3ba369029c1bbfd5888d090e107ce0f5cd7ed074143e466c171ca16064532dcc 20 os-core diff --git a/test/functional/verify/format-mismatch/web-dir/20/Manifest.os-core b/test/functional/verify/format-mismatch/web-dir/20/Manifest.os-core deleted file mode 100644 index 3e305184..00000000 --- a/test/functional/verify/format-mismatch/web-dir/20/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 2 -version: 20 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 20 /usr/bin diff --git a/test/functional/verify/format-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/format-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/format-mismatch/web-dir/20/files/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/format-mismatch/web-dir/version/format1/latest b/test/functional/verify/format-mismatch/web-dir/version/format1/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/format-mismatch/web-dir/version/format1/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/format-mismatch/web-dir/version/format2/latest b/test/functional/verify/format-mismatch/web-dir/version/format2/latest deleted file mode 100644 index 209e3ef4..00000000 --- a/test/functional/verify/format-mismatch/web-dir/version/format2/latest +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/test/functional/verify/ghosted/lines-checked b/test/functional/verify/ghosted/lines-checked deleted file mode 100644 index 2a2339dc..00000000 --- a/test/functional/verify/ghosted/lines-checked +++ /dev/null @@ -1,8 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -Inspected 0 files - 0 files were missing - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/ghosted/target-dir.bak/foo b/test/functional/verify/ghosted/target-dir.bak/foo deleted file mode 100644 index 37bfb8c6..00000000 --- a/test/functional/verify/ghosted/target-dir.bak/foo +++ /dev/null @@ -1,5 +0,0 @@ - .-. - (o o) boo! - | O \ - \ \ - `~~~' diff --git a/test/functional/verify/ghosted/target-dir/foo b/test/functional/verify/ghosted/target-dir/foo deleted file mode 100644 index 37bfb8c6..00000000 --- a/test/functional/verify/ghosted/target-dir/foo +++ /dev/null @@ -1,5 +0,0 @@ - .-. - (o o) boo! - | O \ - \ \ - `~~~' diff --git a/test/functional/verify/ghosted/target-dir/usr/lib/os-release b/test/functional/verify/ghosted/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/ghosted/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/ghosted/test.bats b/test/functional/verify/ghosted/test.bats deleted file mode 100755 index b77e7f32..00000000 --- a/test/functional/verify/ghosted/test.bats +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root -R "$DIR/target-dir" -} - -teardown() { - clean_tars 10 - clean_tars 10 files - sudo cp -r "$DIR/target-dir.bak/foo" "$DIR/target-dir" - revert_chown_root -R "$DIR/target-dir" -} - -@test "verify ghosted file skipped" { - run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" - - [ $status -eq 0 ] - check_lines "$output" - # this should exist at the end, despite being marked as "ghosted" in the - # Manifest and treated as deleted for parts of swupd-client. - [ -f "$DIR/target-dir/foo" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/ghosted/web-dir/10/Manifest.MoM b/test/functional/verify/ghosted/web-dir/10/Manifest.MoM deleted file mode 100644 index 01fc7099..00000000 --- a/test/functional/verify/ghosted/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 907d96973c42eac1e5f81fad740561ac86ade5e9d342ec05274cbc15f9730760 10 os-core diff --git a/test/functional/verify/ghosted/web-dir/10/Manifest.os-core b/test/functional/verify/ghosted/web-dir/10/Manifest.os-core deleted file mode 100644 index 7413eb80..00000000 --- a/test/functional/verify/ghosted/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -.g.. 17a3a547dc2ccfd56bf13f9ed90d086d0d5967127086f223a4a514c7c468ed19 10 /foo diff --git a/test/functional/verify/ghosted/web-dir/version/formatstaging/latest b/test/functional/verify/ghosted/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/ghosted/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/install-directory/lines-checked b/test/functional/verify/install-directory/lines-checked deleted file mode 100644 index ad84508a..00000000 --- a/test/functional/verify/install-directory/lines-checked +++ /dev/null @@ -1,11 +0,0 @@ -Verifying version 10 -Extracting os-core pack for version 10 -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -Inspected 1 files - 1 files were missing - 1 of 1 missing files were replaced - 0 of 1 missing files were not replaced -Fix successful diff --git a/test/functional/verify/install-directory/target-dir/usr/lib/os-release b/test/functional/verify/install-directory/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/install-directory/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/install-directory/test.bats b/test/functional/verify/install-directory/test.bats deleted file mode 100755 index 81b8d899..00000000 --- a/test/functional/verify/install-directory/test.bats +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root "$DIR/web-dir/10/staged/$targetfile" - tar -C "$DIR/web-dir/10" -cf "$DIR/web-dir/10/pack-os-core-from-0.tar" --exclude=staged/$targetfile/* staged/$targetfile -} - -teardown() { - clean_tars 10 - revert_chown_root "$DIR/web-dir/10/staged/$targetfile" - sudo rmdir "$DIR/target-dir/usr/bin/" -} - -@test "verify install directory" { - run sudo sh -c "$SWUPD verify $SWUPD_OPTS --install -m 10" - - check_lines "$output" - [ -d "$DIR/target-dir/usr/bin" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/install-directory/web-dir/10/Manifest.MoM b/test/functional/verify/install-directory/web-dir/10/Manifest.MoM deleted file mode 100644 index 2800a174..00000000 --- a/test/functional/verify/install-directory/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 1bf200ad0db7009656842c8b1751be4b6b4e3956d7a53065d45e289356792cb1 10 os-core diff --git a/test/functional/verify/install-directory/web-dir/10/Manifest.os-core b/test/functional/verify/install-directory/web-dir/10/Manifest.os-core deleted file mode 100644 index 7179a140..00000000 --- a/test/functional/verify/install-directory/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/bin diff --git a/test/functional/verify/install-directory/web-dir/10/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/install-directory/web-dir/10/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/install-directory/web-dir/10/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/install-directory/web-dir/version/formatstaging/latest b/test/functional/verify/install-directory/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/install-directory/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/install-latest-directory/lines-checked b/test/functional/verify/install-latest-directory/lines-checked deleted file mode 100644 index 6010a2fb..00000000 --- a/test/functional/verify/install-latest-directory/lines-checked +++ /dev/null @@ -1,11 +0,0 @@ -Verifying version 100 -Extracting os-core pack for version 100 -Verifying files -Starting download of remaining update content. This may take a while... -Finishing download of update content... -Adding any missing files -Inspected 1 files - 1 files were missing - 1 of 1 missing files were replaced - 0 of 1 missing files were not replaced -Fix successful diff --git a/test/functional/verify/install-latest-directory/target-dir/usr/lib/os-release b/test/functional/verify/install-latest-directory/target-dir/usr/lib/os-release deleted file mode 100644 index e65580ca..00000000 --- a/test/functional/verify/install-latest-directory/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=100 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/install-latest-directory/test.bats b/test/functional/verify/install-latest-directory/test.bats deleted file mode 100755 index ce174eaf..00000000 --- a/test/functional/verify/install-latest-directory/test.bats +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e - -setup() { - clean_test_dir - create_manifest_tar 100 MoM - sign_manifest_mom 100 - create_manifest_tar 100 os-core - chown_root "$DIR/web-dir/100/staged/$targetfile" - tar -C "$DIR/web-dir/100" -cf "$DIR/web-dir/100/pack-os-core-from-0.tar" --exclude=staged/$targetfile/* staged/$targetfile -} - -teardown() { - clean_tars 100 - revert_chown_root "$DIR/web-dir/100/staged/$targetfile" - sudo rmdir "$DIR/target-dir/usr/bin/" -} - -@test "verify install a directory using latest" { - run sudo sh -c "$SWUPD verify $SWUPD_OPTS --install -m latest" - - check_lines "$output" - [ -d "$DIR/target-dir/usr/bin" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/install-latest-directory/web-dir/100/Manifest.MoM b/test/functional/verify/install-latest-directory/web-dir/100/Manifest.MoM deleted file mode 100644 index f14ff4ab..00000000 --- a/test/functional/verify/install-latest-directory/web-dir/100/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 26e45e3e60cf47097f2ff2f5b41ba9512bc3793b5351a60a9fe49ea80fd4b5fe 100 os-core diff --git a/test/functional/verify/install-latest-directory/web-dir/100/Manifest.os-core b/test/functional/verify/install-latest-directory/web-dir/100/Manifest.os-core deleted file mode 100644 index fd0680b1..00000000 --- a/test/functional/verify/install-latest-directory/web-dir/100/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 100 -previous: 10 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 100 /usr/bin diff --git a/test/functional/verify/install-latest-directory/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore b/test/functional/verify/install-latest-directory/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/test/functional/verify/install-latest-directory/web-dir/100/staged/6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/test/functional/verify/install-latest-directory/web-dir/version/formatstaging/latest b/test/functional/verify/install-latest-directory/web-dir/version/formatstaging/latest deleted file mode 100644 index 29d6383b..00000000 --- a/test/functional/verify/install-latest-directory/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/test/functional/verify/latest-missing/lines-checked b/test/functional/verify/latest-missing/lines-checked deleted file mode 100644 index 2065643b..00000000 --- a/test/functional/verify/latest-missing/lines-checked +++ /dev/null @@ -1,2 +0,0 @@ -Curl error: (37) Couldn't read a file:// file -Failed verify initialization, exiting now. diff --git a/test/functional/verify/latest-missing/target-dir/usr/lib/os-release b/test/functional/verify/latest-missing/target-dir/usr/lib/os-release deleted file mode 100644 index e65580ca..00000000 --- a/test/functional/verify/latest-missing/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=100 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/latest-missing/test.bats b/test/functional/verify/latest-missing/test.bats deleted file mode 100755 index dce6f0e0..00000000 --- a/test/functional/verify/latest-missing/test.bats +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -@test "verify install using latest with missing version file on server" { - run sudo sh -c "$SWUPD verify $SWUPD_OPTS --install -m latest" - - check_lines "$(echo "$output" | uniq)" -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/picky-ghosted-missing/lines-checked b/test/functional/verify/picky-ghosted-missing/lines-checked deleted file mode 100644 index fbf50415..00000000 --- a/test/functional/verify/picky-ghosted-missing/lines-checked +++ /dev/null @@ -1,9 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -REGEXP:--picky removing extra files under .* -Inspected 3 files - 0 files were missing - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/picky-ghosted-missing/target-dir.bak/usr/lib/os-release b/test/functional/verify/picky-ghosted-missing/target-dir.bak/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/picky-ghosted-missing/target-dir.bak/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/picky-ghosted-missing/target-dir/usr/lib/os-release b/test/functional/verify/picky-ghosted-missing/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/picky-ghosted-missing/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/picky-ghosted-missing/test.bats b/test/functional/verify/picky-ghosted-missing/test.bats deleted file mode 100755 index 0f4d5d8f..00000000 --- a/test/functional/verify/picky-ghosted-missing/test.bats +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root -R "$DIR/target-dir" -} - -teardown() { - clean_tars 10 - sudo cp -r "$DIR/target-dir.bak/usr" "$DIR/target-dir/" - revert_chown_root -R "$DIR/target-dir" -} - -@test "verify ghosted file not added during --picky" { - run sudo sh -c "$SWUPD verify --fix --picky $SWUPD_OPTS" - - [ $status -eq 0 ] - check_lines "$output" - # this should not exist at the end, despite being marked in the Manifest as - # "ghosted". In this case ghosted files should be ignored. - [ ! -f "$DIR/target-dir/usr/foo" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.MoM b/test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.MoM deleted file mode 100644 index 9939a3af..00000000 --- a/test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 3adc3fb46d04589a96cbd0e6ea2f4a7aef7566daec64778b12865bd67aa160b0 10 os-core diff --git a/test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.os-core b/test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.os-core deleted file mode 100644 index a19ea445..00000000 --- a/test/functional/verify/picky-ghosted-missing/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,11 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr -.g.. 17a3a547dc2ccfd56bf13f9ed90d086d0d5967127086f223a4a514c7c468ed19 10 /usr/foo -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/lib -F... 8b77bb0234b3e202a8e27bc1b4d20c9ca48582519717c8379fb58078feaa5f7a 10 /usr/lib/os-release diff --git a/test/functional/verify/picky-ghosted-missing/web-dir/10/files/17a3a547dc2ccfd56bf13f9ed90d086d0d5967127086f223a4a514c7c468ed19 b/test/functional/verify/picky-ghosted-missing/web-dir/10/files/17a3a547dc2ccfd56bf13f9ed90d086d0d5967127086f223a4a514c7c468ed19 deleted file mode 100644 index 37bfb8c6..00000000 --- a/test/functional/verify/picky-ghosted-missing/web-dir/10/files/17a3a547dc2ccfd56bf13f9ed90d086d0d5967127086f223a4a514c7c468ed19 +++ /dev/null @@ -1,5 +0,0 @@ - .-. - (o o) boo! - | O \ - \ \ - `~~~' diff --git a/test/functional/verify/picky-ghosted-missing/web-dir/version/formatstaging/latest b/test/functional/verify/picky-ghosted-missing/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/picky-ghosted-missing/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/picky-ghosted/lines-checked b/test/functional/verify/picky-ghosted/lines-checked deleted file mode 100644 index 017f6266..00000000 --- a/test/functional/verify/picky-ghosted/lines-checked +++ /dev/null @@ -1,9 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -REGEXP:--picky removing extra files under .* -Inspected 4 files - 0 files were missing - 0 files found which should be deleted -Fix successful diff --git a/test/functional/verify/picky-ghosted/target-dir.bak/usr/foo b/test/functional/verify/picky-ghosted/target-dir.bak/usr/foo deleted file mode 100644 index 37bfb8c6..00000000 --- a/test/functional/verify/picky-ghosted/target-dir.bak/usr/foo +++ /dev/null @@ -1,5 +0,0 @@ - .-. - (o o) boo! - | O \ - \ \ - `~~~' diff --git a/test/functional/verify/picky-ghosted/target-dir.bak/usr/lib/os-release b/test/functional/verify/picky-ghosted/target-dir.bak/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/picky-ghosted/target-dir.bak/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/picky-ghosted/target-dir/usr/foo b/test/functional/verify/picky-ghosted/target-dir/usr/foo deleted file mode 100644 index 37bfb8c6..00000000 --- a/test/functional/verify/picky-ghosted/target-dir/usr/foo +++ /dev/null @@ -1,5 +0,0 @@ - .-. - (o o) boo! - | O \ - \ \ - `~~~' diff --git a/test/functional/verify/picky-ghosted/target-dir/usr/lib/os-release b/test/functional/verify/picky-ghosted/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/picky-ghosted/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/picky-ghosted/test.bats b/test/functional/verify/picky-ghosted/test.bats deleted file mode 100755 index e482c5ce..00000000 --- a/test/functional/verify/picky-ghosted/test.bats +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root -R "$DIR/target-dir" -} - -teardown() { - clean_tars 10 - sudo cp -r "$DIR/target-dir.bak/usr" "$DIR/target-dir/" - revert_chown_root -R "$DIR/target-dir" -} - -@test "verify ghosted file skipped during --picky" { - run sudo sh -c "$SWUPD verify --fix --picky $SWUPD_OPTS" - - [ $status -eq 0 ] - check_lines "$output" - # this should exist at the end, despite being marked as "ghosted" in the - # Manifest. With the ghosted file existing under /usr this test is to make - # sure the ghosted files aren't removed during the --picky flow. - [ -f "$DIR/target-dir/usr/foo" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/picky-ghosted/web-dir/10/Manifest.MoM b/test/functional/verify/picky-ghosted/web-dir/10/Manifest.MoM deleted file mode 100644 index ec686a7d..00000000 --- a/test/functional/verify/picky-ghosted/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... 5d2f97d49149d49a24091a24858f5609bfa9d6a7c8306a071d46970b4960b7cb 10 os-core diff --git a/test/functional/verify/picky-ghosted/web-dir/10/Manifest.os-core b/test/functional/verify/picky-ghosted/web-dir/10/Manifest.os-core deleted file mode 100644 index eb5d90af..00000000 --- a/test/functional/verify/picky-ghosted/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,11 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 0 /usr -.g.. 17a3a547dc2ccfd56bf13f9ed90d086d0d5967127086f223a4a514c7c468ed19 10 /usr/foo -D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 0 /usr/lib -F... 8b77bb0234b3e202a8e27bc1b4d20c9ca48582519717c8379fb58078feaa5f7a 0 /usr/lib/os-release diff --git a/test/functional/verify/picky-ghosted/web-dir/version/formatstaging/latest b/test/functional/verify/picky-ghosted/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/picky-ghosted/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/skip-scripts/lines-checked b/test/functional/verify/skip-scripts/lines-checked deleted file mode 100644 index 713d1413..00000000 --- a/test/functional/verify/skip-scripts/lines-checked +++ /dev/null @@ -1,9 +0,0 @@ -Verifying version 10 -Verifying files -Adding any missing files -Fixing modified files -Inspected 0 files - 0 files were missing - 0 files found which should be deleted -WARNING: post-update helper scripts skipped due to --no-scripts argument -Fix successful diff --git a/test/functional/verify/skip-scripts/target-dir/usr/lib/os-release b/test/functional/verify/skip-scripts/target-dir/usr/lib/os-release deleted file mode 100644 index d20f3873..00000000 --- a/test/functional/verify/skip-scripts/target-dir/usr/lib/os-release +++ /dev/null @@ -1,9 +0,0 @@ -NAME="Clear Linux Software for Intel Architecture" -VERSION=1 -ID=clear-linux-os -VERSION_ID=10 -PRETTY_NAME="Clear Linux Software for Intel Architecture" -ANSI_COLOR="1;35" -HOME_URL="https://clearlinux.org" -SUPPORT_URL="https://clearlinux.org" -BUG_REPORT_URL="https://bugs.clearlinux.org/jira" diff --git a/test/functional/verify/skip-scripts/target-dir/usr/lib/testfile b/test/functional/verify/skip-scripts/target-dir/usr/lib/testfile deleted file mode 100644 index 1304258b..00000000 --- a/test/functional/verify/skip-scripts/target-dir/usr/lib/testfile +++ /dev/null @@ -1 +0,0 @@ -test boot file diff --git a/test/functional/verify/skip-scripts/test.bats b/test/functional/verify/skip-scripts/test.bats deleted file mode 100755 index 0da2f8f5..00000000 --- a/test/functional/verify/skip-scripts/test.bats +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bats - -load "../../swupdlib" - -targetfile=e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 - -setup() { - clean_test_dir - create_manifest_tar 10 MoM - sign_manifest_mom 10 - create_manifest_tar 10 os-core - chown_root "$DIR/target-dir/usr/lib/testfile" - create_fullfile_tar 10 $targetfile -} - -teardown() { - clean_tars 10 - clean_tars 10 files - revert_chown_root "$DIR/web-dir/10/files/$targetfile" - sudo rm "$DIR/target-dir/usr/lib/testfile" - cp "$DIR/web-dir/10/files/$targetfile" "$DIR/target-dir/usr/lib/testfile" -} - -@test "verify override post-update scripts" { - run sudo sh -c "$SWUPD verify --fix --no-scripts $SWUPD_OPTS" - - # check for the warning - check_lines "$output" - # this should exist at the end, even if the scripts are not run - [ -f "$DIR/target-dir/usr/lib/testfile" ] -} - -# vi: ft=sh ts=8 sw=2 sts=2 et tw=80 diff --git a/test/functional/verify/skip-scripts/web-dir/10/Manifest.MoM b/test/functional/verify/skip-scripts/web-dir/10/Manifest.MoM deleted file mode 100644 index 9dbde5b9..00000000 --- a/test/functional/verify/skip-scripts/web-dir/10/Manifest.MoM +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451940175 -contentsize: 0 - -M... d3a72b23cbf54d97b50cc3ff2ee1cae17082c67fde83ceb718bf90f54c94ac43 10 os-core diff --git a/test/functional/verify/skip-scripts/web-dir/10/Manifest.os-core b/test/functional/verify/skip-scripts/web-dir/10/Manifest.os-core deleted file mode 100644 index 152416e6..00000000 --- a/test/functional/verify/skip-scripts/web-dir/10/Manifest.os-core +++ /dev/null @@ -1,8 +0,0 @@ -MANIFEST 3 -version: 10 -previous: 0 -filecount: 1 -timestamp: 1451936779 -contentsize: 17929151 - -.db. 0000000000000000000000000000000000000000000000000000000000000000 10 /usr/lib/testfile diff --git a/test/functional/verify/skip-scripts/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 b/test/functional/verify/skip-scripts/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 deleted file mode 100644 index 1304258b..00000000 --- a/test/functional/verify/skip-scripts/web-dir/10/files/e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 +++ /dev/null @@ -1 +0,0 @@ -test boot file diff --git a/test/functional/verify/skip-scripts/web-dir/version/formatstaging/latest b/test/functional/verify/skip-scripts/web-dir/version/formatstaging/latest deleted file mode 100644 index f599e28b..00000000 --- a/test/functional/verify/skip-scripts/web-dir/version/formatstaging/latest +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/test/functional/verify/verify-add-missing-directory.bats b/test/functional/verify/verify-add-missing-directory.bats new file mode 100755 index 00000000..7c7cea44 --- /dev/null +++ b/test/functional/verify/verify-add-missing-directory.bats @@ -0,0 +1,39 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -d /foo/bar "$TEST_NAME" + # remove the directory that is part of the bundle + sudo rm -rf "$TARGETDIR"/foo/bar + +} + +@test "verify add missing directory" { + + run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Missing file: .*/target-dir/foo/bar + .fixed + Fixing modified files + Inspected 5 files + 1 files were missing + 1 of 1 missing files were replaced + 0 of 1 missing files were not replaced + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_dir_exists "$TEST_NAME"/target-dir/foo/bar + +} diff --git a/test/functional/verify/verify-add-missing-include-old.bats b/test/functional/verify/verify-add-missing-include-old.bats new file mode 100755 index 00000000..75c07385 --- /dev/null +++ b/test/functional/verify/verify-add-missing-include-old.bats @@ -0,0 +1,46 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle1 -f /test-file1 "$TEST_NAME" + create_bundle -n test-bundle2 -f /test-file2 "$TEST_NAME" + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" test-bundle1 --header-only + add_dependency_to_manifest "$WEBDIR"/100/Manifest.test-bundle1 test-bundle2 + set_current_version "$TEST_NAME" 100 + +} + +@test "verify add missing old include" { + + run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 100 + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Missing file: .*/target-dir/test-file2 + .fixed + Missing file: .*/target-dir/usr/share/clear/bundles/test-bundle2 + .fixed + Fixing modified files + Inspected 6 files + 2 files were missing + 2 of 2 missing files were replaced + 0 of 2 missing files were not replaced + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/core + assert_file_exists "$TARGETDIR"/test-file1 + assert_file_exists "$TARGETDIR"/test-file2 + +} diff --git a/test/functional/verify/verify-add-missing-include.bats b/test/functional/verify/verify-add-missing-include.bats new file mode 100755 index 00000000..a4f41ba8 --- /dev/null +++ b/test/functional/verify/verify-add-missing-include.bats @@ -0,0 +1,47 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle1 -f /foo/test-file1 "$TEST_NAME" + create_bundle -n test-bundle2 -f /bar/test-file2 "$TEST_NAME" + # add test-bundle2 and os-core as dependency of test-bundle1 + add_dependency_to_manifest "$WEBDIR"/10/Manifest.test-bundle1 os-core + add_dependency_to_manifest "$WEBDIR"/10/Manifest.test-bundle1 test-bundle2 + +} + +@test "verify add missing include" { + + run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Missing file: .*/target-dir/bar + .fixed + Missing file: .*/target-dir/bar/test-file2 + .fixed + Missing file: .*/target-dir/usr/share/clear/bundles/test-bundle2 + .fixed + Fixing modified files + Inspected 8 files + 3 files were missing + 3 of 3 missing files were replaced + 0 of 3 missing files were not replaced + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/core + assert_file_exists "$TARGETDIR"/foo/test-file1 + assert_file_exists "$TARGETDIR"/bar/test-file2 + +} diff --git a/test/functional/verify/verify-boot-file-deleted.bats b/test/functional/verify/verify-boot-file-deleted.bats new file mode 100755 index 00000000..232cf519 --- /dev/null +++ b/test/functional/verify/verify-boot-file-deleted.bats @@ -0,0 +1,33 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + create_bundle -L -n os-core -f /usr/lib/kernel/testfile "$TEST_NAME" + update_manifest "$WEBDIR"/10/Manifest.os-core file-status /usr/lib/kernel/testfile .db. + update_manifest "$WEBDIR"/10/Manifest.os-core file-hash /usr/lib/kernel/testfile "$zero_hash" + +} + +@test "verify add missing boot file" { + + run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Adding any missing files + Fixing modified files + Inspected 4 files + 0 files were missing + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/usr/lib/kernel/testfile + +} diff --git a/test/functional/verify/verify-boot-file-mismatch-fix.bats b/test/functional/verify/verify-boot-file-mismatch-fix.bats new file mode 100755 index 00000000..8099a51c --- /dev/null +++ b/test/functional/verify/verify-boot-file-mismatch-fix.bats @@ -0,0 +1,40 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -f /usr/lib/kernel/testfile "$TEST_NAME" + # change the content of testfile so the hash doesn't match + write_to_protected_file -a "$TARGETDIR"/usr/lib/kernel/testfile "some new content" + +} + +@test "verify fix incorrect boot file" { + + run sudo sh -c "$SWUPD verify $SWUPD_OPTS --fix" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Fixing modified files + .Hash mismatch for file: .*/target-dir/usr/lib/kernel/testfile + .fixed + Inspected 7 files + 0 files were missing + 1 files did not match + 1 of 1 files were fixed + 0 of 1 files were not fixed + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/usr/lib/kernel/testfile + +} diff --git a/test/functional/verify/verify-boot-file-mismatch.bats b/test/functional/verify/verify-boot-file-mismatch.bats new file mode 100755 index 00000000..6d0da525 --- /dev/null +++ b/test/functional/verify/verify-boot-file-mismatch.bats @@ -0,0 +1,30 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -f /usr/lib/kernel/testfile "$TEST_NAME" + # change the content of testfile so the hash doesn't match + write_to_protected_file -a "$TARGETDIR"/usr/lib/kernel/testfile "some new content" + +} + +@test "verify check incorrect boot file" { + + run sudo sh -c "$SWUPD verify $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + .Hash mismatch for file: .*/target-dir/usr/lib/kernel/testfile + Inspected 7 files + 1 files did not match + Verify successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_file_exists "$TARGETDIR"/usr/lib/kernel/testfile + +} diff --git a/test/functional/verify/verify-boot-skip.bats b/test/functional/verify/verify-boot-skip.bats new file mode 100755 index 00000000..e4fb17af --- /dev/null +++ b/test/functional/verify/verify-boot-skip.bats @@ -0,0 +1,35 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + create_bundle -L -n os-core -f /usr/lib/kernel/testfile "$TEST_NAME" + update_manifest "$WEBDIR"/10/Manifest.os-core file-status /usr/lib/kernel/testfile .db. + update_manifest "$WEBDIR"/10/Manifest.os-core file-hash /usr/lib/kernel/testfile "$zero_hash" + +} + +@test "verify override boot update" { + + run sudo sh -c "$SWUPD verify --fix -b $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Adding any missing files + Fixing modified files + Inspected 4 files + 0 files were missing + 0 files found which should be deleted + Calling post-update helper scripts. + WARNING: boot files update skipped due to --no-boot-update argument + Fix successful + EOM + ) + assert_is_output "$expected_output" + # this should exist at the end, even if cbm is not run + assert_file_exists "$TARGETDIR"/usr/lib/kernel/testfile + +} \ No newline at end of file diff --git a/test/functional/verify/verify-check-missing-directory.bats b/test/functional/verify/verify-check-missing-directory.bats new file mode 100755 index 00000000..f50d2497 --- /dev/null +++ b/test/functional/verify/verify-check-missing-directory.bats @@ -0,0 +1,31 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -d /foo "$TEST_NAME" + # remove the directory /usr/bin from the target-dir + sudo rm -rf "$TARGETDIR"/foo + +} + +@test "verify check missing directory" { + + run sudo sh -c "$SWUPD verify $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + .Hash mismatch for file: .*/target-dir/foo + Inspected 4 files + 1 files did not match + Verify successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_dir_not_exists "$TARGETDIR"/foo + +} + diff --git a/test/functional/verify_v2/verify-client-certificate.bats b/test/functional/verify/verify-client-certificate.bats similarity index 100% rename from test/functional/verify_v2/verify-client-certificate.bats rename to test/functional/verify/verify-client-certificate.bats diff --git a/test/functional/verify/verify-directory-tree-deleted.bats b/test/functional/verify/verify-directory-tree-deleted.bats new file mode 100755 index 00000000..9afc8c51 --- /dev/null +++ b/test/functional/verify/verify-directory-tree-deleted.bats @@ -0,0 +1,45 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + create_bundle -L -n os-core -f /testdir1/testdir2/testfile "$TEST_NAME" + update_manifest "$WEBDIR"/10/Manifest.os-core file-status /testdir1/testdir2/testfile .d.. + update_manifest "$WEBDIR"/10/Manifest.os-core file-status /testdir1/testdir2 .d.. + update_manifest "$WEBDIR"/10/Manifest.os-core file-status /testdir1 .d.. + update_manifest "$WEBDIR"/10/Manifest.os-core file-hash /testdir1/testdir2/testfile "$zero_hash" + update_manifest "$WEBDIR"/10/Manifest.os-core file-hash /testdir1/testdir2 "$zero_hash" + update_manifest "$WEBDIR"/10/Manifest.os-core file-hash /testdir1 "$zero_hash" + +} + + +@test "verify delete directory tree" { + + run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Adding any missing files + Fixing modified files + Deleted .*/target-dir/testdir1/testdir2/testfile + Deleted .*/target-dir/testdir1/testdir2 + Deleted .*/target-dir/testdir1 + Inspected 1 files + 0 files were missing + 3 files found which should be deleted + 3 of 3 files were deleted + 0 of 3 files were not deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_dir_not_exists "$TARGETDIR"/testdir1 + assert_dir_not_exists "$TARGETDIR"/testdir1/testdir2 + assert_file_not_exists "$TARGETDIR"/testdir1/testdir2/testfile + +} diff --git a/test/functional/verify/verify-empty-dir-deleted.bats b/test/functional/verify/verify-empty-dir-deleted.bats new file mode 100755 index 00000000..4386401b --- /dev/null +++ b/test/functional/verify/verify-empty-dir-deleted.bats @@ -0,0 +1,36 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + create_bundle -L -n os-core -d /testdir "$TEST_NAME" + update_manifest "$WEBDIR"/10/Manifest.os-core file-status /testdir .d.. + update_manifest "$WEBDIR"/10/Manifest.os-core file-hash /testdir "$zero_hash" + +} + +@test "verify delete already removed directory" { + + run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Adding any missing files + Fixing modified files + Deleted .*/target-dir/testdir + Inspected 1 files + 0 files were missing + 1 files found which should be deleted + 1 of 1 files were deleted + 0 of 1 files were not deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + assert_dir_not_exists "$TARGETDIR"/testdir + +} diff --git a/test/functional/verify/verify-fix-version-mismatch-override.bats b/test/functional/verify/verify-fix-version-mismatch-override.bats new file mode 100755 index 00000000..d979bc3b --- /dev/null +++ b/test/functional/verify/verify-fix-version-mismatch-override.bats @@ -0,0 +1,42 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + create_bundle -L -n os-core -d /usr/bin "$TEST_NAME" + create_version "$TEST_NAME" 20 10 + update_bundle "$TEST_NAME" os-core --header-only + set_current_version "$TEST_NAME" 20 + # remove /usr/bin so it is missing in the target system + sudo rm -rf "$TARGETDIR"/usr/bin + +} + +@test "verify version mismatch override" { + + run sudo sh -c "$SWUPD verify --fix -m 10 --force $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + WARNING: the force or picky option is specified; ignoring version mismatch for verify --fix + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Missing file: .+/target-dir/usr/bin + .fixed + Fixing modified files + Inspected 3 files + 1 files were missing + 1 of 1 missing files were replaced + 0 of 1 missing files were not replaced + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + +} diff --git a/test/functional/verify/verify-fix-version-mismatch.bats b/test/functional/verify/verify-fix-version-mismatch.bats new file mode 100755 index 00000000..19935274 --- /dev/null +++ b/test/functional/verify/verify-fix-version-mismatch.bats @@ -0,0 +1,26 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_version "$TEST_NAME" 20 10 + update_bundle "$TEST_NAME" os-core --add-dir /usr/bin + set_current_version "$TEST_NAME" 20 + +} + +@test "verify version mismatch enforcement" { + + run sudo sh -c "$SWUPD verify --fix -m 10 $SWUPD_OPTS" + assert_status_is "$EMANIFEST_LOAD" + expected_output=$(cat <<-EOM + Verifying version 10 + ERROR: Fixing to a different version requires --force or --picky + Error: Fix did not fully succeed + EOM + ) + assert_is_output "$expected_output" + +} \ No newline at end of file diff --git a/test/functional/verify/verify-format-mismatch-override.bats b/test/functional/verify/verify-format-mismatch-override.bats new file mode 100755 index 00000000..018901d0 --- /dev/null +++ b/test/functional/verify/verify-format-mismatch-override.bats @@ -0,0 +1,48 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -u "$TEST_NAME" 10 1 + bump_format "$TEST_NAME" + create_version -u "$TEST_NAME" 40 30 2 + update_bundle "$TEST_NAME" os-core --add-dir /usr/bin + +} + +@test "verify format mismatch override" { + + # the -x option bypasses the fatal error + run sudo sh -c "$SWUPD verify --fix -F 1 -m 40 -x $SWUPD_OPTS_NO_FMT" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 40 + WARNING: the force option is specified; ignoring format mismatch for verify + WARNING: the force or picky option is specified; ignoring version mismatch for verify --fix + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Missing file: .+/target-dir/usr/bin + .fixed + Fixing modified files + .Hash mismatch for file: .*/target-dir/usr/lib/os-release + .fixed + Hash mismatch for file: .*/target-dir/usr/share/defaults/swupd/format + .fixed + Inspected 10 files + 1 files were missing + 1 of 1 missing files were replaced + 0 of 1 missing files were not replaced + 2 files did not match + 2 of 2 files were fixed + 0 of 2 files were not fixed + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + +} \ No newline at end of file diff --git a/test/functional/verify/verify-format-mismatch.bats b/test/functional/verify/verify-format-mismatch.bats new file mode 100755 index 00000000..b56a1859 --- /dev/null +++ b/test/functional/verify/verify-format-mismatch.bats @@ -0,0 +1,26 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -u "$TEST_NAME" 10 1 + bump_format "$TEST_NAME" + create_version -u "$TEST_NAME" 40 30 2 + +} + +@test "verify format mismatch enforcement" { + + run sudo sh -c "$SWUPD verify --fix -F 1 -m 40 $SWUPD_OPTS_NO_FMT" + assert_status_is "$EMANIFEST_LOAD" + expected_output=$(cat <<-EOM + Verifying version 40 + ERROR: Mismatching formats detected when verifying 40 (expected: 1; actual: 2) + Latest supported version to verify: 20 + Error: Fix did not fully succeed + EOM + ) + assert_is_output "$expected_output" + +} diff --git a/test/functional/verify/verify-ghosted.bats b/test/functional/verify/verify-ghosted.bats new file mode 100755 index 00000000..cadcd0d3 --- /dev/null +++ b/test/functional/verify/verify-ghosted.bats @@ -0,0 +1,34 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -e "$TEST_NAME" + create_bundle -L -n os-core -f /foo "$TEST_NAME" + update_manifest "$WEBDIR"/10/Manifest.os-core file-status /foo .g.. + +} + +@test "verify ghosted file skipped" { + + run sudo sh -c "$SWUPD verify --fix $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Adding any missing files + Fixing modified files + Inspected 1 files + 0 files were missing + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_is_output "$expected_output" + # this should exist at the end, despite being marked as "ghosted" in the + # Manifest and treated as deleted for parts of swupd-client. + assert_file_exists "$TARGETDIR"/foo + +} diff --git a/test/functional/verify/verify-install-directory.bats b/test/functional/verify/verify-install-directory.bats new file mode 100755 index 00000000..ca4a8c66 --- /dev/null +++ b/test/functional/verify/verify-install-directory.bats @@ -0,0 +1,38 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -d /foo/bar "$TEST_NAME" + # remove the directory bar from the target-dir + sudo rm -rf "$TARGETDIR"/foo/bar + +} + +@test "verify install directory" { + + run sudo sh -c "$SWUPD verify $SWUPD_OPTS --install -m 10" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Downloading packs... + Extracting os-core pack for version 10 + Extracting test-bundle pack for version 10 + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Inspected 5 files + 1 files were missing + 1 of 1 missing files were replaced + 0 of 1 missing files were not replaced + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_is_output "$expected_output" + assert_dir_exists "$TARGETDIR"/foo/bar + +} diff --git a/test/functional/verify/verify-install-latest-directory.bats b/test/functional/verify/verify-install-latest-directory.bats new file mode 100755 index 00000000..deab5780 --- /dev/null +++ b/test/functional/verify/verify-install-latest-directory.bats @@ -0,0 +1,38 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -d /foo/bar "$TEST_NAME" + create_version "$TEST_NAME" 100 10 + update_bundle "$TEST_NAME" test-bundle --add-dir /foo/baz + +} + +@test "verify install a directory using latest" { + + run sudo sh -c "$SWUPD verify $SWUPD_OPTS --install -m latest" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 100 + Downloading packs... + Extracting os-core pack for version 10 + Extracting test-bundle pack for version 100 + Verifying files + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Adding any missing files + Inspected 6 files + 1 files were missing + 1 of 1 missing files were replaced + 0 of 1 missing files were not replaced + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_is_output "$expected_output" + assert_dir_exists "$TARGETDIR"/foo/baz + +} diff --git a/test/functional/verify/verify-latest-missing.bats b/test/functional/verify/verify-latest-missing.bats new file mode 100755 index 00000000..0be74b45 --- /dev/null +++ b/test/functional/verify/verify-latest-missing.bats @@ -0,0 +1,33 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + # remove the formatstaging/latest + sudo rm -rf "$WEBDIR" + +} + +test_teardown() { + + # we need to manually clean this up because the destroy_test_environment + # function will refuse to delete this since the test environment does not + # look like a test environment anymore (missing web-dir) + sudo rm -rf "$TEST_NAME" + +} + +@test "verify install using latest with missing version file on server" { + + run sudo sh -c "$SWUPD verify $SWUPD_OPTS --install -m latest" + assert_status_is_not 0 + expected_output=$(cat <<-EOM + Curl error: \(37\) Couldn.t read a file:// file + Failed verify initialization, exiting now. + EOM + ) + assert_regex_is_output "$expected_output" + +} diff --git a/test/functional/verify/verify-picky-ghosted-missing.bats b/test/functional/verify/verify-picky-ghosted-missing.bats new file mode 100755 index 00000000..89a08979 --- /dev/null +++ b/test/functional/verify/verify-picky-ghosted-missing.bats @@ -0,0 +1,37 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -u "$TEST_NAME" + create_bundle -L -n test-bundle -f /usr/foo -d/usr/share/clear/bundles "$TEST_NAME" + update_manifest "$WEBDIR"/10/Manifest.test-bundle file-status /usr/foo .g.. + # since the files must have been installed by the -L option, remove /usr/foo + sudo rm -f "$TARGETDIR"/usr/foo + +} + +@test "verify ghosted file not added during --picky" { + + run sudo sh -c "$SWUPD verify --fix --picky $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Adding any missing files + Fixing modified files + --picky removing extra files under .* + Inspected 11 files + 0 files were missing + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + # this should not exist at the end, despite being marked in the Manifest as + # "ghosted". In this case ghosted files should be ignored. + assert_file_not_exists "$TARGETDIR"/usr/foo + +} diff --git a/test/functional/verify/verify-picky-ghosted.bats b/test/functional/verify/verify-picky-ghosted.bats new file mode 100755 index 00000000..12f22bc3 --- /dev/null +++ b/test/functional/verify/verify-picky-ghosted.bats @@ -0,0 +1,36 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment -u "$TEST_NAME" + create_bundle -L -n test-bundle -f /usr/foo -d/usr/share/clear/bundles "$TEST_NAME" + update_manifest "$WEBDIR"/10/Manifest.test-bundle file-status /usr/foo .g.. + +} + +@test "verify ghosted file skipped during --picky" { + + run sudo sh -c "$SWUPD verify --fix --picky $SWUPD_OPTS" + assert_status_is 0 + expected_output=$(cat <<-EOM + Verifying version 10 + Verifying files + Adding any missing files + Fixing modified files + --picky removing extra files under .* + Inspected 12 files + 0 files were missing + 0 files found which should be deleted + Calling post-update helper scripts. + Fix successful + EOM + ) + assert_regex_is_output "$expected_output" + # this should exist at the end, despite being marked as "ghosted" in the + # Manifest. With the ghosted file existing under /usr this test is to make + # sure the ghosted files aren't removed during the --picky flow. + assert_file_exists "$TARGETDIR"/usr/foo + +} diff --git a/test/functional/verify/verify-skip-scripts.bats b/test/functional/verify/verify-skip-scripts.bats new file mode 100755 index 00000000..9ead4516 --- /dev/null +++ b/test/functional/verify/verify-skip-scripts.bats @@ -0,0 +1,36 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -L -n test-bundle -f /usr/lib/kernel/testfile "$TEST_NAME" + create_version "$TEST_NAME" 20 10 + update_bundle "$TEST_NAME" test-bundle --delete /usr/lib/kernel/testfile + set_current_version "$TEST_NAME" 20 + +} + +@test "verify override post-update scripts" { + + run sudo sh -c "$SWUPD verify --fix --no-scripts $SWUPD_OPTS" + assert_status_is 0 + # check for the warning + expected_output=$(cat <<-EOM + Verifying version 20 + Verifying files + Adding any missing files + Fixing modified files + Inspected 6 files + 0 files were missing + 0 files found which should be deleted + WARNING: post-update helper scripts skipped due to --no-scripts argument + Fix successful + EOM + ) + assert_is_output "$expected_output" + # this should exist at the end, even if the scripts are not run + assert_file_exists "$TARGETDIR"/usr/lib/kernel/testfile + +}