reanahub / reana-client

REANA command-line client
http://reana-client.readthedocs.io/
MIT License
10 stars 46 forks source link

validation: check for whitespaces in the image specification #604

Closed audrium closed 2 years ago

audrium commented 2 years ago

To test apply these changes to the helloworld serial demo:

   type: serial
   specification:
     steps:
-      - environment: 'python:2.7-slim'
+      - environment: 'python:2.7-slim '
         commands:
           - python "${helloworld}"
               --inputfile "${inputfile}"

and do reana-client validate --environments. It should return:

...
-> ERROR: Environment image 'python:2.7-slim ' contains illegal characters.
codecov-commenter commented 2 years ago

Codecov Report

Merging #604 (e0a03a0) into master (cfd526e) will increase coverage by 0.01%. The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #604      +/-   ##
==========================================
+ Coverage   55.84%   55.86%   +0.01%     
==========================================
  Files          23       23              
  Lines        2258     2261       +3     
==========================================
+ Hits         1261     1263       +2     
- Misses        997      998       +1     
Impacted Files Coverage Δ
reana_client/validation/environments.py 26.36% <50.00%> (+0.61%) :arrow_up:
reana_client/config.py 100.00% <100.00%> (ø)