Skip to content
Snippets Groups Projects
  1. Apr 20, 2020
  2. Apr 17, 2020
  3. Apr 08, 2020
  4. Jan 23, 2020
  5. Jan 17, 2020
  6. Jan 16, 2020
  7. Jan 13, 2020
  8. Jan 10, 2020
    • David Douard's avatar
      Make tests pass with django 2 · 75e7385e
      David Douard authored
      For this we:
      
      - ensure we create the DepositRequest with str as raw_metadata (instead
        of a bytes), and
      - make atom_dataset return a str instead of a bytes
      
        Every time this chunk of data is sent on the wire (http req to the django app)
        this needs to be an str, otherwise we have things like:
      
          raw_metadata = "b'[...]'"
      
        especially when testing against django 2, which is the only django version
        available on debian sid, so this is needed to make it possible to build the
        deb file on sid *with* tests enabled.
      - add a py3-django2 environment in tox
      - bump the dependency to django <3 in requirements-server.txt (otherwise it
        will take precendence on the deps: field of the tox file, thus execute tests
        in py3-django2 with django 1.11).
      
      Note that no other tests than executing pytest have been done with django2, so
      do not expect it works flawlessly.
      75e7385e
    • David Douard's avatar
      00eadef4
  9. Jan 09, 2020
  10. Jan 08, 2020
  11. Jan 07, 2020
  12. Dec 20, 2019
    • David Douard's avatar
      cli/client: add a --format option to cli client commands · c8cf77bd
      David Douard authored
      This new option allows these cli commands (upload and status) to produce
      JSON or YAML output, so it's easier to test.
      c8cf77bd
    • David Douard's avatar
      tests: make tests run with a proper scheduler · 5a635951
      David Douard authored
      so the scheduler interaction code is executed.
      
      Note that this does not test for correctness in these interactions yet.
      
      also move tests/__init__.py content in tests/conftest.py and adapt test code
      accordingly.
      
      This also ensures retries_left is set otherwise tests may fail when using
      the local sheduler.
      5a635951
    • David Douard's avatar
      conftest: use pytest-postgresql for django related tests · 64772596
      David Douard authored
      Replace the (non-working) django init hook by overloaded django_db_setup
      and make this django_db_setup use pytest-postgresql so we do not depend on
      external test environment (running postgresql server, tox or hand managed
      pifpaf).
      64772596
    • David Douard's avatar
      Always generate a zip file from uploaded archives · 3edb9134
      David Douard authored
      even if there is only one of those, otherwise the loader will fail since
      this later does expect the archive to be a zip file.
      3edb9134
    • David Douard's avatar
      Move load-deposit task creation code in the deposit-check private API endpoint · 00cc6083
      David Douard authored
      Also replace utils.origin_url_from() by a Deposit.origin_url property, and
      ensure the archive file format of the uploaded file is supported.
      
      The rename of invalid.tar.gz as invalid.gz is required for tests to pass
      which should not be the case. It will be investigated in a later revision,
      but for now we want tests to be green.
      
      This requires to make config dict available in SWHPrivateAPIView so we can
      have access to a scheduler from there.
      00cc6083
    • David Douard's avatar
      Make load-deposit and check-deposit URL argument absolute · 5c85e6de
      David Douard authored
      ensuring these generalted URLs are correct and resolvable (eg. when the WSGI
      app is mounted on a different path than /).
      
      This needed to move the post_deposit_save code from a signal directly
      within the view, so we have a request from which we can forge absolute URLs.
      5c85e6de
  13. Dec 19, 2019
  14. Dec 18, 2019
  15. Dec 12, 2019
  16. Dec 06, 2019
  17. Dec 03, 2019
  18. Nov 25, 2019
  19. Nov 21, 2019
Loading