1. 22 Apr, 2021 7 commits
  2. 15 Apr, 2021 9 commits
  3. 14 Apr, 2021 5 commits
    • Georges Racinet's avatar
      API Censor: catch HgError and return a nicer message · bd5d3e042f2a
      Georges Racinet authored
      This avoids a lengthy traceback, yet unfortunately is not
      able to give more details about the actual error. In the
      RSpec test, we use a tombstone too long to trigger it.
      
      Also fixing the error rendering for non Mercurial projects.
      
      --HG--
      branch : heptapod-stable
      bd5d3e042f2a
    • Georges Racinet's avatar
      RSpec API censor: making non-UTF8 test pass · 0471073b188e
      Georges Racinet authored
      The remaining problem was the size of the *whole*
      replacement data, which is tombstone + 15, hence the
      data to censor has to be more than 15 bytes.
      
      --HG--
      branch : heptapod-stable
      0471073b188e
    • Georges Racinet's avatar
      RSpec API censor: file with name really \xe9 · 02e996c635c3
      Georges Racinet authored
      With an encoding specification, the lower layers were
      happy to convert to the default FS encoding, which is
      UTF-8 in most cases, of course.
      
      This could serve as an example for similar tests.
      
      --HG--
      branch : heptapod-stable
      02e996c635c3
    • Georges Racinet's avatar
      RSpec API hg_censor: avoid repo reuse · c94d4ae8a191
      Georges Racinet authored
      with `let_it_be` the repo would be reused, which is harmful
      in this case. Of course the end result is very slow, but that's
      mostly the best we can do right now.
      
      --HG--
      branch : heptapod-stable
      c94d4ae8a191
    • Georges Racinet's avatar
      HgGitRepository#multi_action: fix for non-UTF8 file paths · 3d0574635569
      Georges Racinet authored
      Logging directly with `#{filepath}` gives a JSON encoding
      error, adding rspec dumps as a Ruby litteral and always work.
      
      I could confirm that it was all that was needed to
      commit a file with non-UTF8 file name.
      
      Also taking care of branch names, yet not sure in that case what
      is really possible.
      
      --HG--
      branch : heptapod-stable
      3d0574635569
  4. 13 Apr, 2021 4 commits
  5. 08 Apr, 2021 1 commit
  6. 06 Apr, 2021 1 commit
  7. 16 Apr, 2021 2 commits
  8. 05 Apr, 2021 5 commits
    • Georges Racinet's avatar
      HGitaly RSpec tests for Blob/Tree in fully native mode · 5a6c09aa65b2
      Georges Racinet authored
      The tests are conditionally skipped according to the
      HGitaly server version.
      
      There *is* a small discrepancy: line ending in commit message,
      but it doesn't actually lie in the code being tested, it should
      be a comparison case in `FindCommit`.
      
      Comparing with `HgGitRepository` is still useful for these
      tests at this point, because there is some plumbery involved
      on the Rails side for the HGitaly1 mode, and even in fully native
      mode, it's good to check that nothing goes wrong. When the dust
      settles on all this, though, it will be removable: actual thorough
      comparisons are to be done in the testing code of HGitaly.
      
      --HG--
      branch : heptapod
      5a6c09aa65b2
    • Georges Racinet's avatar
      RSpec: request and store HGitaly version on configuration object · ea7d9baf84e2
      Georges Racinet authored
      With this, the HGitaly version will be accessible as
      `RSpec.configuration.hgitaly_version`, and mostly used
      for conditional skipping, making hooking in Rails and
      landing in HGitaly less interdependent, provided new
      features in HGitaly come with an appropriate version
      change (doesn't have to be pushed to PyPI because the
      CI always run HGitaly from the head of the `default` or
      `stable` branch).
      
      The simplest syntax to skip RSpec tests is
      
      ```ruby
      
        if 'does something', skip: boolean_method
      
      ```
      
      but `boolean_method` would have to be a class method, and
      would turn out to be executed before `TestEnv`, hence before
      HGitaly is started. Therefore the `skip` method will have to
      be run from examples (and `before` hooks). The new
      `RSpec.configuration` method is a good way to access the version
      information. It's not lazy, but it's expected to be negligible
      compared to the huge startup time.
      
      --HG--
      branch : heptapod
      ea7d9baf84e2
    • Georges Racinet's avatar
      Merge from heptapod branch · 67810d172bf7
      Georges Racinet authored
      In release branches, tests are almost exclusively run from
      the CI, were the test harness improvement avoiding rebuild
      of Workhorse should entirely be bypassed.
      
      This merge will be validated by CI, hence making sure that
      we didn't introduce trouble for the next release.
      
      --HG--
      branch : heptapod-0-21
      67810d172bf7
    • Georges Racinet's avatar
      Merged test harness improvement from heptapod-stable · 7b2da10cf18f
      Georges Racinet authored
      --HG--
      branch : heptapod
      7b2da10cf18f
    • Georges Racinet's avatar
      RSpec tests harness: avoid useless Workhorse rebuilds · 22de94601b66
      Georges Racinet authored
      Since Workhorse upstream GitLab bundled Workhorse in the main
      repository, the test harness is using it, with a detection system
      to trigger rebuilds. Being based on Git, it wasn't working
      properly, resulting in `bin/rspec` always rebuilding Workhorse.
      
      Here we adapt the rebuild triggering logic to Mercurial
      
      One could expect a Makefile calling the Go compiler to run fast
      in any case, but that still took 14 seconds on my fast workstation,
      the irony being that the tests we are using in development of
      Heptapod are very seldom calling through Workhorse.
      
      --HG--
      branch : heptapod-stable
      22de94601b66
  9. 02 Apr, 2021 6 commits