• Zeger-Jan van de Weg's avatar
    Testing: Allow newer components for local tests · f70beeb8
    Zeger-Jan van de Weg authored
    Rebuilding Gitaly is done for a Gitaly version that mismatches the
    GITALY_SERVER_VERSION. Due to a continuous deployment, these rebuilds
    are quite frequent and thus triggered a lot.
    
    This change allows a newer Gitaly to be used, locally, for these tests.
    Which in practice will decrease the number of rebuilds.
    
    This achieved by running `git merge-base --is-ancestor` in the tmp
    component directory, and depends on the HEAD being the same as the built
    assets.
    
    The other option was to parse `gitaly -version`, but this wouldn't have
    worked for `gitlab-shell` etc, and thus using HEAD as heuristic was
    chosen.
    f70beeb8
test_env.rb 18.1 KB