Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70174

Git client automated tests need to be adapted for shallow clone

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-client-plugin
    • None
    • Jenkins 2.375
      Git client plugin 3.13.0
    • 3.13.1

      The Jenkins plugin compatibility tester is being extended to perform tests using a shallow, single branch clone of plugin repositories. A shallow clone of a single branch is much faster than a clone of all branches with the entire history of the repository.

      Unfortunately, the git client plugin relies on a clone of all branches with the entire history. It uses the git repository of the git client plugin as a source of data for automated tests.

      When the git client plugin is cloned with a shallow, single branch clone, some of the tests fail. Those tests need to be adapted so that they do not fail when run on a shallow, single branch clone.

      They could be adapted by simply being skipped (early return from the test) when the test detects that it is running in a repository that is a shallow clone. They could be adapted to rely on a different source of data for the test repository. There are probably other ways that they could be adopted as well. Each failing test will need to be reviewed and then a pull request created that recommends whether the test should be skipped (by early return), revised, or deleted.

      See the git plugin pull request that adapted a failing test on the git plugin. That pull request illustrates a test that adapts itself to a shallow clone.

      See the git plugin commit that disables GitTagAction tests on Windows for an example of early exit.

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: