Read about our upcoming Code of Conduct on this issue

  1. 14 Nov, 2021 1 commit
  2. 26 Oct, 2021 1 commit
  3. 17 Oct, 2021 1 commit
  4. 25 Oct, 2021 1 commit
  5. 10 Nov, 2021 1 commit
  6. 03 Nov, 2021 5 commits
  7. 24 Oct, 2021 8 commits
  8. 21 Oct, 2021 7 commits
    • Georges Racinet's avatar
      Gitaly Comparison test_compare_find_local_branches(): rewrote with RpcHelper · 9daed7d5e566
      Georges Racinet authored
      The upcoming conflict didn't happen, but that is probably because we
      forgot to add new comparison tests with pagination and sort.
      
      It will be probably easier with those new helpers
      9daed7d5e566
    • Georges Racinet's avatar
      Gitaly Comparison tests: new helper function to normalize gRPC commits · 60a339b360fa
      Georges Racinet authored
      It is rather clear that these normalizations will be systematically
      needed.
      
      We could have introduced something similar to the `response_sha_attrs`
      argument of `RpcHelper()`, but it would have been a bit complicated
      to implement right now, as it would have to share some of the
      iteration logic with `message_to_git()`. Could be a subject for
      a subsequent refactoring, if we don't decide to tackle the differences
      before (but that requires HGitaly1 to be a thing of the past).
      60a339b360fa
    • Georges Racinet's avatar
      098156a700d3
    • Georges Racinet's avatar
      Gitaly Comparison test_delete_refs: using `RepoWrapper.reload()` · 9cee95b55b2d
      Georges Racinet authored
      This is a just-released feature of mercurial-testhelpers.
      
      With the inner functions enclosing the `hg_repo` local variable
      we had to systematically redefine `hg_repo` upon each reload() or
      stop using that abbreviation. We chose the latter.
      9cee95b55b2d
    • Georges Racinet's avatar
      2aba198ddf4b
    • Georges Racinet's avatar
      Gitaly Comparison tests: generic comparison methods · d2a9a756b70f
      Georges Racinet authored
      This follows the development patterns we've been using lately:
      a single bunch of request attributes is given to, e.g, the
      `assert_compare` method, which translates it to Git for Gitaly.
      Request translation is fairly simple, taking care of direct
      attributes that are declared to be commit SHAs.
      
      Before comparison, the Mercurial response is also translated to
      Git. This is done with a list of attribute dotted paths, with
      the special convention that a name ending in `[]` represents a
      list-like value on which iteration must happen (see example
      in `tests_with_gitaly/test_commit.py`).
      
      For cases where attributes are not comparable, or more generally
      acknowledged to differ, the `normalizer` callable can be used.
      
      It's not clear this makes tests easier to write, but it probably
      makes them easier to read.
      
      For the conversion of Mercurial SHAs to Git SHAs, we're
      accessing the hg-git class, which is a bit heavy-handed but gives
      us more chances to understand future incompatibility, as the
      on-disk format storage of the mapping is due to change in hg-git.
      d2a9a756b70f
    • Georges Racinet's avatar
      Gitaly Comparison Tests: normalizing ui.username · e47f9676e2e5
      Georges Racinet authored
      In case `ui.username` takes the default form (such as `user@localhost`),
      HGitaly presents it as `name=user` (and the obvious) `email=user@localhost`
      whereas hg-git sets the same value in `name` and `email`.
      
      We set an explicit default user with both name and email, instead of
      changing the logic in main code because:
      
      - this is not a real discrepancy between HGitaly and Gitaly (after all,
      it depends on hg-git, which is purely testing apparatus in this context).
      - it is implemented using the generic internal `hg_stringutil` helper
      - I believe it to be actually better than using an email address for
        name.
      e47f9676e2e5
  9. 20 Jul, 2021 2 commits
    • Georges Racinet's avatar
      CommitAuthor message: taking time zones into account · e9713fe6837f
      Georges Racinet authored
      Up to now, we've been simply been ignoring the offset provided
      by Mercurial and were not displaying any timezone on the resulting
      `Author` message.
      
      Gitaly comparison tests will be provided by work currently in
      progress to make comparison more systematic.
      e9713fe6837f
    • Georges Racinet's avatar
      Gitaly Comparison tests: RpcHelper class for do_rpc pattern · 02c16a746431
      Georges Racinet authored
      This should help reducing the boilerplate in comparison tests,
      while also making clear that the focus of them is the comparison,
      not the actual responses. For instance, we should not need to
      update expected values in the tests if Gitaly fixes a bug and we
      follow suit.
      
      We're using `test_find_ref_name()` to demonstrate.
      
      A possible next step would be to include commit id conversions
      in the `RpcHelper` class, or rather the fixture.
      
      Closes #56
      02c16a746431
  10. 09 Sep, 2021 5 commits
  11. 08 Sep, 2021 3 commits
  12. 06 Sep, 2021 4 commits
  13. 02 Sep, 2021 1 commit