i-VRESSE / bartender

Middleware web service to schedule jobs on various infrastructures
https://i-vresse-bartender.readthedocs.io
Apache License 2.0
1 stars 0 forks source link

Add GET /api/job/{jobid}/files/{path} route #46

Closed sverhoeven closed 1 year ago

sverhoeven commented 1 year ago

Fixes #44

Also adds GET /api/job/{jobid}/stderr route.

To test

  1. Execute job as described at https://github.com/i-VRESSE/bartender/tree/44-host-job-files#word-count-example
  2. Try out the GET /api/job/{jobid}/files/{path} route
    • with path=returncode should return same content as /tmp/jobs/1/returncode file on filesystem.
  3. Try out the GET /api/job/{jobid}/stdout route
    • should return same content as /tmp/jobs/1/stdout.txt file on filesystem.
  4. Try out the GET /api/job/{jobid}/stderr route
    • should return same content as /tmp/jobs/1/stderr.txt file on filesystem.
  5. Test nested paths
    1. on filesystem run mkdir /tmp/jobs/1/output && echo foo > /tmp/jobs/1/output/somefile.txt
    2. Try GET /api/job/{jobid}/files/output/somefile.txt
    3. Should return foo as content
sverhoeven commented 1 year ago

Thanks for reviewing