1. 03 Jun, 2020 3 commits
    • Georges Racinet's avatar
      Heptapod: providing `restart_rails()` in the base class · daf358925926
      Georges Racinet authored
      The only caller at the time being is its sibling method
      `apply_hashed_storage_setting()`, that will hence become
      available for all concrete subclasses that implement
    • Georges Racinet's avatar
      New GdkHeptapod concrete class · c0a71291b3ac
      Georges Racinet authored
      It derives from SourceHeptapod, only adding service management
      and rake capabilities, hence being able to support backup tests
      and other tests that require service management.
    • Georges Racinet's avatar
      Heptapod: backup handling impl in the abstract base class · 4316399e1320
      Georges Racinet authored
      Instead of just declaring `backup_create()` and `backup_restore()`,
      we implement them generically, relying on a new set of primitives
      to be implemented in subclasses:
      - `ctl_services()`: service management
      - `RAILS_SERVICES`: class attribute listing the Rails app services
        (web and background). These will be different in the Docker and
        GDK cases.
      - `rake()`
      - `remove_all_backups()`
  2. 14 May, 2020 1 commit
    • Georges Racinet's avatar
      SourceHeptapod: make run_shell work · 757d36e282bc
      Georges Racinet authored
      Some callers want to pass a system user name, and we have to
      accept that for uniformity ('git' is been used as meaning
      "the default user", which is lame but that's another story)
  3. 01 May, 2020 1 commit
  4. 02 Apr, 2020 1 commit
  5. 01 Apr, 2020 2 commits
  6. 31 Mar, 2020 1 commit
  7. 29 Mar, 2020 1 commit
  8. 27 Mar, 2020 2 commits
  9. 20 Feb, 2020 1 commit
  10. 19 Feb, 2020 2 commits
    • Georges Racinet's avatar
      Bumping the initial timeout to 10mn · 82f67c127a58
      Georges Racinet authored
      One day it'll become configurable. In the meanwhile, 5 minutes can
      be too short if Heptapod is starting from scratch, i.e. has to run
      all the initial Chef configuration, database creation etc.
    • Georges Racinet's avatar
      Supporting running through a Selenium RemoteWebDriver · 90fc419eedf0
      Georges Racinet authored
      This is a preliminary for any CI attempt, since installing the webdriver
      inside a Docker container is a long and error prone process.
      This will allow to use a separate service image such as
      `selenium/standalone-chrome` and that may also turn to be a good option
      even outside Docker-based CI contexts.
      The new `Heptapod.new_webdriver()` method is now the unique one to be
      called to create new drivers, a preliminary to be able to run the
      tests with other drivers anyway. In particular, this should come handy
      if installing chromedriver is a problem.
  11. 15 Feb, 2020 1 commit
    • Georges Racinet's avatar
      Declarative system for network connections from Heptapod · b92b9db84c8b
      Georges Racinet authored
      We'll need to have Heptapod initiate connections to the
      system running the tests, in order to test outbound operations
      such as web hooks.
      We introduce a marker for tests that rely on this, so that they
      can be skipped, together with the new `--heptapod-reverse-call-host`
      option, for that to be possible, with reasonable defaults.
  12. 19 Jan, 2020 2 commits
    • Georges Racinet's avatar
      New `heptapod-ssh-user` option · 155961c2b15c
      Georges Racinet authored
      This will be useful for testing on remote servers, since we
      can't know it in advance.
      We could probably request the API for that
      but we aren't at this point (and it would slow the tests down a bit).
      The default value is 'git', though.
    • Georges Racinet's avatar
      Heptapod base class ready to support remote servers · 14de0027d5d1
      Georges Racinet authored
      In particular, capabilities such as `fs_access` are now
      expressed as class attributes that will be queried
      for conditional skipping or to disable some fixture extra
      behaviours, such as second cleanup passes and the like.
      Some methods are now implemented by the base class, if only
      to raise a catchable `NotImplementedError`
  13. 15 Jan, 2020 1 commit
  14. 07 Jan, 2020 1 commit
  15. 04 Jan, 2020 1 commit
    • Georges Racinet's avatar
      Supporting Heptapod source installs · 6b9f58423048
      Georges Racinet authored
      We have two new options:
      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.
  16. 01 Jan, 2020 4 commits
  17. 14 Dec, 2019 2 commits
    • Georges Racinet's avatar
      ssh: key management for testing users · 199fdc12838a
      Georges Racinet authored
      We embed two freshly created SSH keys for these tests,
      and provide the necessary infrastructure to register them
      in Heptapod and retrieve them in the tests.
    • Georges Racinet's avatar
      ssh: defining host name and port for SSH testing · 558194059562
      Georges Racinet authored
      From now on, the forwarded ports of the Heptapod container
      will have to be on the `heptapod` host, as explained in
      The Heptapod object now has a `ssh_url` property that will
      serve as the base for performing hg commands over SSH.
  18. 17 Nov, 2019 1 commit
  19. 15 Nov, 2019 1 commit
    • Georges Racinet's avatar
      GitLab 10.3: don't make the default branch protected by default · 334fdada8eb9
      Georges Racinet authored
      It seems that the default branch becomes protected (FULL) by default in
      10.3, which makes all our tests performing actual Git force pushes (not
      based on -f but on the push really not being fast-forwardable) break.
      This is a quickfix, we should have tests for various scenarios on protected
      branches, and they should test user feedback as well (see heptadod#122)
  20. 17 Sep, 2019 1 commit
    • Georges Racinet's avatar
      Switched Heptapod tests to Python3 · a6796784bc7f
      Georges Racinet authored
      apart from the usual str/bytes dance in subprocesses and I/O,
      (we can assume that hg and docker exec outputs are essentially
      ASCII, can be handled by the default UTF-8 codec or that we'd
      write something dedicated otherwise),
      the notable thing is that we need inner fixture generator to
      become a context manager, because something in teardowns catches
      StopIteration too early and raises RuntimeError. This is cleaner
  21. 15 Sep, 2019 1 commit
  22. 10 Nov, 2019 1 commit
  23. 13 Sep, 2019 1 commit
  24. 09 Nov, 2019 1 commit
  25. 10 Sep, 2019 1 commit
  26. 09 Sep, 2019 2 commits
    • Georges Racinet's avatar
      Project: made creation through Web UI a classmethod · cea504e617dc
      Georges Racinet authored
      This avoids importing the project module, and in particular
      the masking niceties that can endeavour.
    • Georges Racinet's avatar
      Project: made destroy() a method · e38e11512c90
      Georges Racinet authored
      This is a bit simpler for callers, but the fixtures need it to
      become idempotent (hence skip_missing) for tests that call destroy()
      directly. In turn those tests (currently test_destroy only) don't
      need to depend on many fixtures nor to import 'project'
  27. 28 Aug, 2019 1 commit
  28. 12 Aug, 2019 1 commit
  29. 16 Jul, 2019 1 commit
    • Georges Racinet's avatar
      Heptapod fixture creates a basic user who owns projects · 156d2f6215e2
      Georges Racinet authored
      With this change, a persistent unprivileged user `test_basic` is
      created, with its API token.
      The Heptapod fixture retrieves the token and starts a web session as
      this user, the project fixtures have it own their projects.
      It felt reasonible to have this generic user persist across test
      sessions, notably because user destruction is partly asynchronous in
      GitLab, because removing all objects authored by this user can be
      very long.
      We'll probably have this user own further test projects and create
      auxiliary, transient additional users to interact with the projects.