testing/tests/download: test case for git refs
authorRicardo Martincoski <ricardo.martincoski@datacom.ind.br>
Sat, 12 May 2018 02:58:28 +0000 (23:58 -0300)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Mon, 4 Feb 2019 19:44:29 +0000 (20:44 +0100)
commit0a90740488b3f981f754f422030574a4b28e95f4
tree93757405c24d8167236014c06d9b59c8e85e44a9
parenta2dd1bf25d07aeef776e10c304c6dfdce7d2e453
testing/tests/download: test case for git refs

All upcoming tests for git refs will rely on the return code of make to
determine whether a git ref can be downloaded or not and also to
determine whether the downloaded content is correct (all of this taking
advantage of the check-hash mechanism already in place for git
packages).
So to avoid false results i.e. in the case the check-hash mechanism
become broken in the master branch, add some sanity checks before the
actual test of download git refs.

Add the minimum test case for git refs containing only sanity checks.
Reuse the commit in the static repo.
Add a br2-external with two packages to check that:
 - trying to download an invalid sha1 generates an error;
 - downloading a valid sha1 that contains unexpected content generates
   an error.

In order to ease the maintenance and review, each upcoming patch adding
checks to this test case will add at same time the commits to the static
repo, the equivalent packages to the br2-external and code to the test
case.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
Cc: Arnout Vandecappelle <arnout@mind.be>
Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
.gitlab-ci.yml
support/testing/tests/download/br2-external/git-refs/Config.in [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/external.desc [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/external.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-wrong-sha1/git-wrong-sha1.mk [new file with mode: 0644]
support/testing/tests/download/test_git.py