Skip to content
Snippets Groups Projects
  1. Jun 05, 2020
    • Georges Racinet's avatar
      User.token_headers() · 6cffadeb
      Georges Racinet authored
      This is obviously the right place to mutualize the API token logic.
      Forfunately, token headers creation is not spread all over the
      tests, just in a few helper classes
      6cffadeb
    • Georges Racinet's avatar
      Preparations: simplified root user info and token setup · 0c7dfea6
      Georges Racinet authored
      It makes more sense to set the root user once (and in the uniform
      way provided by the User class), to ensure its token immediately
      and to just assume that in the subsequent setups.
      
      Notably `session.login_as_root()` might simply not be called at all
      in the current test run.
      0c7dfea6
    • Georges Racinet's avatar
      Preparations: made root webdriver lazy · 7db10f33
      Georges Racinet authored
      This is a bit different than for regular users, since
      we have potentially the root password first initialization
      sequence.
      7db10f33
    • Georges Racinet's avatar
      Preparations: made webdriver for basic user lazy · f8b865f4
      Georges Racinet authored
      This already saves us 5s at each startup.
      
      - `session.ensure_user()` doesn't initialize a webdriver any more.
      - `Heptapod.get_user_webdriver()` creates the driver if needed
        and stores it
      - `User.ensure_private_token()` now uses `Heptapod.get_user_webdriver()`
        instead of taking a webdriver argument
      f8b865f4
    • Georges Racinet's avatar
      Central method to get a user webdriver · 7fb8d5a1
      Georges Racinet authored
      After this change, no test gets a webdriver directly
      from the dict on Heptapod object, opening the road to
      make webdriver initialization lazy.
      7fb8d5a1
    • Georges Racinet's avatar
      Preparations: caching user access tokens · 5f5ce18e
      Georges Racinet authored
      These can't be read with a webdriver, as it is a security feature
      of GitLab not to display them, that's why we where creating new
      ones for each session.
      
      Storing them in a cache file will help making the session startup
      time shorter. This is especially useful if launching a few tests
      repeatedly or with the tests that have to redo the preparations after
      an instance restart.
      5f5ce18e
    • Georges Racinet's avatar
      User: new api_get method · 952e922d
      Georges Racinet authored
      Can be used to obtain more information about the user, and also
      to test that an existing access token is working.
      952e922d
    • Georges Racinet's avatar
      Session: moved user personal token generation to User class · b0029b6d
      Georges Racinet authored
      A prelude to forthcoming changes to cache it.
      
      the `create()` class method will automatically store the user
      information in the Heptapod instance, but `search()` won't,
      because it doesn't have the password information (but its caller
      might)
      b0029b6d
    • Georges Racinet's avatar
      Session: fixed long false docstring · c3c23d13
      Georges Racinet authored
      c3c23d13
    • Georges Racinet's avatar
      User: separate class method to make the root User instance · 2c804ca5
      Georges Racinet authored
      Having name and id harcoded, it's better to have a single method
      in case we'd want to hardcode less or change things.
      2c804ca5
    • Georges Racinet's avatar
      User: nicer repr() · 68c3ffaf
      Georges Racinet authored
      We don't need to repeat the Heptapod instance in all log messages,
      nor the password
      68c3ffaf
    • Georges Racinet's avatar
      Preparations: timed test users management · d0cc38e2
      Georges Racinet authored
      These preparations (signed-in webdriver, personal access token)
      are only done once per session, but if the session is comprised of
      only a few tests, they can represent a good chunk of the run time.
      
      For example, launching the only current test in test_wikis.py,
      they represent 45% of the total time (on a warmed up GDK Heptapod
      based on GitLab 12.10).
      d0cc38e2
  2. Jun 03, 2020
  3. Jun 02, 2020
  4. May 29, 2020
  5. May 27, 2020
  6. May 09, 2020
  7. May 24, 2020
  8. May 22, 2020
    • Georges Racinet's avatar
      hg: allow passing preencoded command arguments · 3a0317f9
      Georges Racinet authored
      This will be necessary for tests about content that's
      not encoded with the current default encoding.
      
      Because of this, the output might not be utf-8 either. For now,
      just avoiding an error is good enough.
      3a0317f9
  9. May 23, 2020
  10. May 21, 2020
  11. May 14, 2020
  12. May 19, 2020
  13. May 18, 2020
Loading