Read about our upcoming Code of Conduct on this issue

  1. 16 Feb, 2021 1 commit
  2. 15 Feb, 2021 1 commit
    • Georges Racinet's avatar
      Heptapod: users registry now contains User instances · 6b153b87be71
      Georges Racinet authored
      This solves a discrepancy that has plagued the heptapod-tests
      code base for long.
      
      In the beginning, users where represented as simple dicts, themselves
      kept in a registry: `user` attribute of the `Heptapod` instance.
      Then, more advanced manipulation needs pushed to the creation of
      the `User` class, but the user registry wasn't updated at the time.
      
      The tricky part, explaining why it wasn't made right away is that
      we often start with a partial representation of the user: for instance
      not knowing its numeric id.
      
      Over time some of the test code has been updated to use higher-level
      methods of the `Heptapod` class, such as `get_user_webdriver()`, in
      prevision for the present move, but still, the registry values remained
      at heart just dicts, while lots of needed logic is implemented in
      the `User` class.
      
      Now we'll have `User` instances in the registry. That still leaves us
      with some illogical aspects, like lazy webdriver and token initialization
      indirected through the `Heptapod` class, instead of being transparent
      properties `User`. But from now on, improving on this should be incremental
      and involve identifiers easy to search in the code base.
      
      --HG--
      branch : stable
      6b153b87be71
  3. 03 Nov, 2020 1 commit
    • Georges Racinet's avatar
      Made Projects and Groups be context managers · ea826dc5dbfb
      Georges Racinet authored
      This will allow for nicer cleanups, especially for those
      created in tests.
      
      We're adopting the strong cleanup capability and the larger timeout
      in `Project.__exit__()` to mimic what the Project fixtures do, in
      the hope to have them simply use the new Context Managers.
      ea826dc5dbfb
  4. 17 Nov, 2020 1 commit
  5. 27 Apr, 2020 1 commit
  6. 02 Apr, 2020 1 commit
    • Georges Racinet's avatar
      Group: ensuring directory existence while putting an HGRC · 70f8ec33c26e
      Georges Racinet authored
      With the hashed storage, the group directory is not guaranteed
      to exist any more. It wouldn't on plain GitLab if all the projects
      have been created with the hashed storage.
      
      Care must be taken to create with the proper system user,
      otherwise tests would break in non obvious ways, especially since
      Rails has automatic rollbacks (mostly silent) for what
      we're testing (transfers…)
      70f8ec33c26e
  7. 09 Feb, 2020 1 commit
  8. 04 Jan, 2020 1 commit
    • Georges Racinet's avatar
      Supporting Heptapod source installs · 6b9f58423048
      Georges Racinet authored
      We have two new options:
      
        --heptapod-source-install
        --heptapod-repositories-root
      
      In source installs, as provided by the GitLab Development Kit
      (GDK), we obviously don't have docker commands, but we have
      direct access to processes and filesystem paths.
      
      To support that, we move the Heptapod class to its own
      module, and split it in a base class with two subclasses.
      We also introduce higher level file manipulation, using the
      tar file uploads as before in the Docker case, and direct
      file manipulation in the source case. We drop the artificial
      flexibility we had about uid/gid: they aren't usable in the
      source case, and they are fixed in the Docker case anyway.
      
      Also, the SSH url have to be different, because it's the current
      user in the source case.
      6b9f58423048
  9. 01 Jan, 2020 1 commit
    • Georges Racinet's avatar
      Recentralized Docker calls on Heptapod, with configurable CT name · cb1b185b4ffb
      Georges Racinet authored
      The container name is now stored as an attribute on the Heptapod
      instance, and it's been a good opportunity to centralize docker calls
      there.
      
      Since we're not mentioning docker at all in the API,
      this is also a step towards running these tests
      on a source install of Heptapod: it wouldn't be hard to implement
      them with subprocess and direct filesystem manipulations.
      cb1b185b4ffb
  10. 10 Nov, 2019 2 commits
  11. 09 Nov, 2019 1 commit
    • Georges Racinet's avatar
      Groups: a new test helper · 34a6499ed6b2
      Georges Racinet authored
      we need a full GET to retrieve derived information such as
      the full_path.
      
      In general, ownership information is not available. Therefore
      unless we know about it in the first place because we performed
      the creation, GET and DELETE have to be done as root
      34a6499ed6b2