1. 24 Sep, 2020 4 commits
    • Sebastien Robin's avatar
      performance tests: it becomes about useless to use listbox_coef · 089bf7b2
      Sebastien Robin authored
      The performance of a module is much less impacted by the number
      of objects than before, at least for kind of total we have in
      tests (about 1000 objects)
      089bf7b2
    • Sebastien Robin's avatar
    • Jérome Perrin's avatar
      accounting: fix validation of accounting transactions with too precise amounts · 07e817df
      Jérome Perrin authored
      Round the amounts line by line when validating transactions balances and
      showing the totals on an accounting transaction.
      
      Even though float field configurations do not allow users to input transactions
      where amounts uses more digits that what makes sense for the selected currency,
      we had cases where some transactions generated by custom scripts were "too
      precise" and passed the validation because unlike in all reports where we
      display sum of rounded values, the check was only rounding the sum, which cause
      some transactions with 1.00 on one side and 0.333333 0.333333 and 0.333333 on
      the other side to be valid.
      
      The scripts used to display sums on an accounting transaction had the same
      problem, they were also showing the rounded sum and not the sum of rounded
      values.
      07e817df
    • Jérome Perrin's avatar
      testRestrictedPythonSecurity: simplify and normalize multi lines tests · 921507f0
      Jérome Perrin authored
      Always use textwrap.dedent implicitly so that we don't have to do it in
      every test and disable the way of making multi lines scripts by passing
      multiple arguments. Now there's only one way to do and every tests use the
      same way
      921507f0
  2. 23 Sep, 2020 4 commits
    • Jérome Perrin's avatar
      forge: fix random failures with testTemplateTool · ef4060d7
      Jérome Perrin authored
      getRepositoryList contain all business template repositories, ie:
      
            ['/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5-doc/bt5',
             '/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5/bt5',
             '/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5/product/ERP5/bootstrap',
             '/srv/slapgrid/slappart4/srv/slapos/soft/c63ba7265399450b28f9ea6d5667a5e7/parts/erp5-bin/bt5']
      
      it seems in random order.
      
      Test was written to use the one from parts/erp5/bt5, but since it just
      takes "anything which does not contain bootstrap" it was sometimes getting
      erp5-bin or erp5-doc and could not find erp5_configurator_standard business
      template.
      
      Change the selection of the repository to take into account that we may also
      have erp5-doc and erp5-bin and so that it fails if more than one.
      ef4060d7
    • Jérome Perrin's avatar
      patches/Restricted: allow random.Random · b512c173
      Jérome Perrin authored
      all member of random module are available (because in ZopeGuards, there's a
      random.__allow_access_to_unprotected_subobjects__ = 1), SystemRandom class
      also is, but Random class was not, even though there should be nothing unsafe
      in this.
      
      This is needed if we want to use a random number generator with a fixed seed
      to get reproductible results. We could use random.seed module level function
      but since this is also used by several things in ERP5 this does not produce
      reproductible sequences.
      b512c173
    • Jérome Perrin's avatar
      Enable coding style for scalability test · cba1f0e2
      Jérome Perrin authored
      See merge request nexedi/erp5!1265
      cba1f0e2
    • Arnaud Fontaine's avatar
      ZODB Components: TestZodbDocumentComponentReload (e5587493): No need to run... · 408cc3bd
      Arnaud Fontaine authored
      ZODB Components: TestZodbDocumentComponentReload (e5587493): No need to run other common Component tests.
      408cc3bd
  3. 21 Sep, 2020 3 commits
  4. 18 Sep, 2020 3 commits
  5. 17 Sep, 2020 7 commits
  6. 16 Sep, 2020 11 commits
  7. 15 Sep, 2020 7 commits
  8. 11 Sep, 2020 1 commit
    • Jérome Perrin's avatar
      test_result: Retry flaky tests · b559f4c5
      Jérome Perrin authored
      ERP5 functional tests are failing too often, until we improve the tests or the
      code so that we don't have these intermitent failures, restart the failed tests
      a bit automatically.
      
      This is of course not good, because it's hiding problems, but the current state
      of the test suite with many randomly failing test makes that we sometimes miss
      when permanent failures are introduced.
      
      See merge request nexedi/erp5!1206
      b559f4c5