1. 01 Apr, 2020 2 commits
  2. 31 Mar, 2020 1 commit
  3. 29 Mar, 2020 1 commit
  4. 27 Mar, 2020 2 commits
  5. 20 Feb, 2020 1 commit
  6. 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.
      82f67c127a58
    • 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.
      90fc419eedf0
  7. 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.
      b92b9db84c8b
  8. 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.
      155961c2b15c
    • 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`
      14de0027d5d1
  9. 15 Jan, 2020 1 commit
  10. 07 Jan, 2020 1 commit
  11. 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
  12. 01 Jan, 2020 4 commits
  13. 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.
      199fdc12838a
    • 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
      README.
      
      The Heptapod object now has a `ssh_url` property that will
      serve as the base for performing hg commands over SSH.
      558194059562
  14. 17 Nov, 2019 1 commit
  15. 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)
      334fdada8eb9
  16. 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
      anyway.
      a6796784bc7f
  17. 15 Sep, 2019 1 commit
  18. 10 Nov, 2019 1 commit
  19. 13 Sep, 2019 1 commit
  20. 09 Nov, 2019 1 commit
  21. 10 Sep, 2019 1 commit
  22. 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.
      cea504e617dc
    • 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'
      e38e11512c90
  23. 28 Aug, 2019 1 commit
  24. 12 Aug, 2019 1 commit
  25. 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.
      156d2f6215e2
  26. 02 Aug, 2019 1 commit
    • Georges Racinet's avatar
      Rationalize fixtures · 5bd43e6b7682
      Georges Racinet authored
      The `heptapod` fixture now has a Selenium driver with a running session for
      the root user (previously represented by the `webdriver` fixture).
      
      Since it represents external state that persists even across test sessions,
      it is given the "session" scope, but only the Selenium part is actually
      teared down. Using this scope makes my running times go down from 1mn to
      a bit more than 40s.
      
      Factorized code between the two kinds of projects
      
      In adapting the tests to this, realized that now most of them don't even
      need direct references to the `heptapod` fixture.
      5bd43e6b7682
  27. 03 Jul, 2019 3 commits
    • Georges Racinet's avatar
      b1881e85f08d
    • Georges Racinet's avatar
      New fixture: public_project · 75794bb6c328
      Georges Racinet authored
      This leverages Project.api_edit
      75794bb6c328
    • Georges Racinet's avatar
      Generate, retrieve and store root user private token · 3074e12a0d71
      Georges Racinet authored
      This makes the `heptapod` fixture hold user password and private token
      information, something that we may want to revisit later, but that is
      simple enough for now.
      
      At instance creation, we generate a new private token for the root user,
      as it seems that the initially displayed value is not activated.
      
      Upon normal login, we retrieve the user private token, and store it in the
      `heptapod` fixture, along with its password.
      
      This should also enable us to stop hardcoding the root password and makes
      us close to be able to support tests running with regular users.
      3074e12a0d71
  28. 28 Jun, 2019 1 commit
    • Georges Racinet's avatar
      Refactored project fixture to provide requests helper · cd22bd429be9
      Georges Racinet authored
      with this it becomes much easier to perform direct HTTP request
      or GitLab JSON API requests on the test project.
      
      Also, this is a step towards multi-user tests, or at least tests
      not running as the 'root' user, although the fact that we're using the
      'root' user and that it is the owner of all sessions and projects is
      still hardcoded a lot.
      cd22bd429be9
  29. 25 May, 2019 1 commit
    • Georges Racinet's avatar
      Testing that project removal works from the UI · c61c62dcc44c
      Georges Racinet authored
      In order to test that, we separate the cleanup from the
      destroy call so that test_project_destroy actually tests the
      feature,  and keep the cleanup in the teardown sequence, as
      a protection for other tests in case of regressions.
      c61c62dcc44c