1. 04 Jun, 2021 1 commit
  2. 24 May, 2021 3 commits
    • Georges Racinet's avatar
      Native migration: test for Git SHA fallback. · 3f9305366ab3
      Georges Racinet authored
      Related to heptapod#421
    • Georges Racinet's avatar
      Introducing `sql` test marker · 5e11f32afbdb
      Georges Racinet authored
      Consistent with the Heptapod classes implementing
      the `psql` method, tests with this marker will be
      skipped for remote and unspecified source instances.
    • Georges Racinet's avatar
      Heptapod: new generic method to run SQL statements · 484c7a3cf9c5
      Georges Racinet authored
      It is called `psql` for emphasis that it is not based on
      a library client but on the CLI (ran in the proper context).
      For now, not implemented for source and remote instances, but
      we could do it by reading proper connection information from
      GitLab config for the former and from command-line args for
      the latter (of course a remote port can well not be available
      at all).
      Could also be less hardcoded in the future if needed.
  3. 18 May, 2021 1 commit
  4. 15 Apr, 2021 1 commit
  5. 31 Mar, 2021 3 commits
    • Georges Racinet's avatar
      Native Mercurial: making sure full or hgitaly1 is as expected · efad83473a67
      Georges Racinet authored
      It's easy to have a previously set feature flag value (done in
      console with boolean) or at least to have doubts. Relying on
      exposition of the `hgitaly1` boolean value on the `Project` model,
      this makes sure we are testing what we think we are.
    • Georges Racinet's avatar
      Native Mercurial: splitting in full and hgitaly1 mode · a0de115d5fd8
      Georges Racinet authored
      With the full native mode being controlled by feature flags,
      it makes sense to provide facilities in these functional tests
      to use either the HGitaly1 or the fully native mode.
      This is done by changing the `--heptapod-hg-native` command-line
      argument from an activation flag to an option with two values:
      `hgitaly1` and `full`.
      Later on, we'll introduce new CI jobs for the fully native mode.
    • Georges Racinet's avatar
      Heptapod CI: Standalone chromedriver image in inside tests · a9aeccd510ac
      Georges Racinet authored
      Instead of painfully installing a working ChromeDriver with
      a PPA, we just call the external service. This effectively
      rollbacks the package installations done in ca5e23226837
      Closes #17
  6. 28 Feb, 2021 15 commits
    • Georges Racinet's avatar
      Production Server tests: supporting Clever Cloud SSO · 5157c01044e5
      Georges Racinet authored
      This gives us post-install tests capability for heptapod.host.
    • Georges Racinet's avatar
      Production Server tests: require user email · c5b7d3f57360
      Georges Racinet authored
      Same as with the `User` class, this will be necessary for
      SSO logins where the email is the primary identifier.
    • Georges Racinet's avatar
      session.sign_in_page_login(): code reordering · 4d191f5048a1
      Georges Racinet authored
      it will be later convenient for `user` to be available before
      the web form specifics.
    • Georges Racinet's avatar
      User: flag to prefer access tokens in VCS operations · d7f2d49a16db
      Georges Racinet authored
      This is necessary for 2FA and SSO, but we don't want to make
      it the general case because:
      - accessing `User.token` does not guarantee that the token is
        initialized. It probably will at some point, be it only for
        uniformity with `webdriver`, which does
      - creating a token if needed is expensive, and may not be useful
        for some temporary users.
    • Georges Racinet's avatar
      User: cleanup remnant of adoption · 4f0262c58912
      Georges Racinet authored
      Instead of `User` we better use `cls` in the classmethods,
      to avoid puzzling behaviour if subclasses arise in the future.
    • Georges Racinet's avatar
      User: keeping track of email · c58dc5d814f9
      Georges Racinet authored
      This will be essential for SSO logins for which the email
      is the proper identifier.
    • Georges Racinet's avatar
      selenium.wait_could_click_element(), new util · 3b63c6b045f9
      Georges Racinet authored
      It saves a bit of boilerplate: caller doesn't have
      to import `WebDriverWait`
    • Georges Racinet's avatar
      Heptapod: removed the get_user_webdriver() method · 539ade5321f7
      Georges Racinet authored
      It had become frankly redundant, removing it makes it
      clearer that the `User.webdriver` property is what callers
      should use.
    • Georges Racinet's avatar
      User: removed login() method in favor of webdriver property · bbbe50896671
      Georges Racinet authored
      It was just there as a refactoring step, and had the
      drawback to depend on the `_webdriver` attribute not to be None,
      which is an implementation detail.
      All callers should use the `webdriver` property.
    • Georges Racinet's avatar
      User: adopted logic to close webdriver · 6d0c5253aacc
      Georges Racinet authored
      Even the `Heptapod` instance should not care about the `_webdriver`
      attribute, which is now an implementation detail.
      Also allows to close the webdriver immediately if there's any
      in `delete()`.
    • Georges Racinet's avatar
      User: made webdriver a property · 391820b64471
      Georges Racinet authored
      Now the creation of the webdriver and the login sequence are
      all transparently (and lazily) handled by the `User` instance.
      This is much simpler for tests, as demonstrated in the case
      of the test with the external_user fixture.
      This makes `Heptapod.get_user_webdriver` fairly trivial.
    • Georges Racinet's avatar
      User: adopted `session.login` · 341c98d15d38
      Georges Racinet authored
    • Georges Racinet's avatar
      User: adopted session.ensure_user · 6bb7ef588881
      Georges Racinet authored
      This follows up on the principle that the `session` module should
      be lower level than the `Heptapod` and `User` classes and prepares
      for future refactorings by avoiding import loops.
    • Georges Racinet's avatar
      session,Heptapod: standardisation of login sequence · 6254d1e283b2
      Georges Racinet authored
      - the webdriver is no longer created either by the `Heptapod`
        method or by the `session` module. An expected benefit is
        to avoid webdriver process leaks in case of failed logins
      - the special case of the `root` user is handled transparently by
    • Georges Racinet's avatar
      session, User: avoid ambiguity in login flow · c49a65be9f69
      Georges Racinet authored
      The `session` module should be about lower level, not
      object-oriented, primitives that don't care about
      caching of web drivers and generally maintaining state.
      The `login_as_user()` method did not fit there, because
      it called to the Heptapod object, which does exactly that.
      This was an ambiguity, that could easily lead to infinite
      loops when developping new features.
      It is a better fit on the `User` class. Actually the next
      natural move would be to make `webdriver` a property, renaming
      the current attribute to `_webdriver` as already done with
      The only caller, in `test_projects`, is updated by this.
  7. 25 Feb, 2021 1 commit
    • Georges Racinet's avatar
      configexpress: basic tests · c864f293f2a1
      Georges Racinet authored
      With all the capturing that Heptapod does, it is worth
      checking that configexpress actually works (renders client
      side through data sent with bundles).
  8. 27 Feb, 2021 1 commit
    • Georges Racinet's avatar
      Heptapod CI: appropriate tag for hg-current image · bb6839826f8a
      Georges Racinet authored
      We have stopped pushing to `hg-current:latest` in favor of
      `hg-current:default` long ago.
      Forthcoming new tests will need new dependencies (hg extensions)
      on the client side.
      Also updated comment for the fact that `hg-current:stable` now
      does exist.
  9. 25 Feb, 2021 3 commits
  10. 22 Feb, 2021 2 commits
    • Georges Racinet's avatar
      flake8 · 5acd811402d9
      Georges Racinet authored
    • Georges Racinet's avatar
      Heptapod CI inside: avoiding chromedriver from Ubuntu Snap · ca5e23226837
      Georges Racinet authored
      With the upgrade of the base Heptapod Docker image to Ubuntu 20.04
      in the wake of moving to GitLab 13.9 comes the fact that the whole
      chromium suite is now available as snaps only. No big surprise that
      the selenium tests launched from inside the Docker container don't
      work: the container is not even privileged in our setup (and it
      To work around this, we're now installing chromedriver from a PPA.
      For automated, sandboxed, testing, this is tolerable.
      A longer term move would be to re-explore the possibility to use
      the Firefox driver.
  11. 19 Feb, 2021 1 commit
    • Georges Racinet's avatar
      Heptapod: added start/end logging for backups · 1d18e6772e46
      Georges Racinet authored
      On HDK instances, the backup restoration is often really long,
      it's worthwile to know it has started and is still ongoing.
      In cases one launches the tests and comes back later, it is also
      useful to notice how long it took (time to purge repositories/ and
      run `rake dev:setup` to start afresh)
      Also, an immediate log that the restoration failed does not hurt.
  12. 18 Feb, 2021 6 commits
  13. 16 Feb, 2021 2 commits
    • Georges Racinet's avatar
      Heptapod: invalidate instance cache according to type and URL · 4104ff18e9be
      Georges Racinet authored
      With the new testing of production servers, the fixed user
      names can differ from an instance (e.g. local, for tests development)
      to another (actual production), leading to errors.
      Invalidating based on URL only would not be enough for people that
      actually work on the production mode – by testing it on a local
      instance (typically provided by the HDK).
      There already was a invalidation system for the token itself (test
      and recreate if it does not work), but not for the mere existence
      of an user in the registry.
      branch : stable
    • Georges Racinet's avatar
      Testing production servers: activated some runner tests · c7516a71cef9
      Georges Racinet authored
      With the previous change providing insulation by disabling
      shared and group runners on the project, this works right away.
      branch : stable