1. 05 Aug, 2019 2 commits
    • Georges Racinet's avatar
      README: rules for management of the default branch · 00a276fbd5fb
      Georges Racinet authored
      these can be amended later, but it's occurring to me that
      the interdependency with changes in Heptapod has to be
      clarified, if only as a reference for myself.
      00a276fbd5fb
    • Georges Racinet's avatar
      Fixed flakiness in project destruction assertion · 4625448d0965
      Georges Racinet authored
      This happened for me in about 5% of tests in tear down phase.
      It has value to test project destruction through the regular UI,
      hence not converting to API call right away.
      
      An API call would probably be more efficient for teardowns though,
      and would help us make the difference between tear down and testing
      of the delete feature.
      4625448d0965
  2. 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
  3. 02 Aug, 2019 2 commits
    • Georges Racinet's avatar
      Moved MR creation to project method · 0c7ec6b19bbe
      Georges Racinet authored
      and this means that the merge request tests don't need the
      heptapod fixture either.
      0c7ec6b19bbe
    • 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
  4. 03 Jul, 2019 2 commits
  5. 31 Jul, 2019 1 commit
    • Georges Racinet's avatar
      Stop dumping traceback if elt non interactable · 4d4635f41a39
      Georges Racinet authored
      This is a valid reason to wait for interaction to be possible.
      That traceback at least pollutes the error log in tear downs
      and could even possibly be a cause of teardown being taken for failed
      (not sure, will need more runs)
      4d4635f41a39
  6. 30 Jul, 2019 1 commit
    • Georges Racinet's avatar
      test_push: adding to topic and checking what GitLab sees · 4ebee2a040ab
      Georges Racinet authored
      in particular, in my current hg-git development, I want
      to make sure that special rules for "merges" of topics won't
      interfere with regular pushes, hence we also test explicitely
      adding a new changeset to the topic.
      
      This one confirmed I was introducing a bug.
      4ebee2a040ab
  7. 19 Jul, 2019 6 commits
  8. 28 Jun, 2019 1 commit
  9. 07 Apr, 2019 1 commit
    • Georges Racinet's avatar
      Finished test for autodetection of rebase+publish · 2bf9cc32fc96
      Georges Racinet authored
      Rebasing and publishing from the command line is not
      currently detected by Heptapod as merging the MR.
      
      With this changeset, we complete the test for that
      scenario (currently failing).
      
      As a novelty, we started to call in the API directly. It should
      eventually become the norm for a good chunk of these tests, as
      it's much easier and should be more stable than relying on HTML
      structure of web pages intended for end users.
      2bf9cc32fc96
  10. 03 Jul, 2019 9 commits
    • Georges Racinet's avatar
      Rewrote tests using the new utils.hg · 53d441253924
      Georges Racinet authored
      53d441253924
    • Georges Racinet's avatar
      Basic test for public repositories · 706885653d5f
      Georges Racinet authored
      We use the new `public_project` fixture and the new `utils.hg` module
      706885653d5f
    • Georges Racinet's avatar
      utils: helper class for local repos · 9612cee7c4a3
      Georges Racinet authored
      This will make tests much easier to write and more readable, while
      still permitting to get errors on the exact failed command.
      9612cee7c4a3
    • Georges Racinet's avatar
      Fixing project creation delay · b77442b75893
      Georges Racinet authored
      It's possible that GitLab would be partly asynchronous, hence waiting
      for actual availability is useful.
      
      Also, we need to refresh hgserve until heptapod#64 is not solved.
      b77442b75893
    • Georges Racinet's avatar
      New fixture: public_project · 75794bb6c328
      Georges Racinet authored
      This leverages Project.api_edit
      75794bb6c328
    • Georges Racinet's avatar
      Project API methods using private user token · e2f8beeb8fef
      Georges Racinet authored
      We leverage the availability of working private tokens to introduce
      the new `api_edit()` and `owner_api_get()` methods of `Project`
      
      Note that using the user session from the Selenium driver is not enough,
      due to cross-site request forgeries protection. Once we gobbled the initial
      effort to generate the user tokens, they definitely are the proper, simple
      way of doing this.
      
      We store a copy of the private user token on the project and use it in the new
      api_edit().
      
      At this point, there's nothing hardcoded about the root user in
      the projects module, except the overridable default group for new projects.
      e2f8beeb8fef
    • Georges Racinet's avatar
      Fixed create_merge_request() signature · 4e17f0dfd0a8
      Georges Racinet authored
      The project fixtures are indeed now `Project` instances.
      This has also the benefit to stop hardcoding the 'root' group in this
      method
      4e17f0dfd0a8
    • Georges Racinet's avatar
      Cleaned up leftover unreachable code · 715ee6d8623c
      Georges Racinet authored
      715ee6d8623c
    • 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
  11. 28 Jun, 2019 4 commits
  12. 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
  13. 13 Apr, 2019 1 commit
    • Georges Racinet's avatar
      Test for prune problems (issue #45) · cbf28a6d01a9
      Georges Racinet authored
      It's worthwile to notice that we would get a client-side
      warning proposing to use --force if we pushed the orphan
      changeset right away, but we don't if we prune its parent
      after the whole stack has been pushed.
      
      At some point, the hg utility command should be mutualized
      (maybe as a class) in `test/utils`
      cbf28a6d01a9
  14. 08 Apr, 2019 1 commit
    • Georges Racinet's avatar
      Testing a basic push scenario · f15f27c8aede
      Georges Racinet authored
      Currently, the two other tests we have that actually perform
      a push are in drafts changesets for more complex scenarios that don't
      pass yet
      f15f27c8aede
  15. 07 Apr, 2019 1 commit
  16. 03 Apr, 2019 4 commits
  17. 05 Oct, 2018 2 commits