deis / workflow-cli

The CLI for Deis Workflow
http://deis.com
MIT License
31 stars 43 forks source link

fix(cmd) Fix proctype regex for setting limits #308

Closed felixbuenemann closed 7 years ago

felixbuenemann commented 7 years ago

This fixes the proctype regex to match the one used by deis/controller.

This fixes an issue reported by @tylux on slack where setting limits for a proctype called "worker1" failed with:

Error: worker1=100M/350M doesn’t fit format type=#unit or type=# or type=#/#

I've also added a few test cases that check for good and bad proctypes.

codecov-io commented 7 years ago

Codecov Report

Merging #308 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #308   +/-   ##
=======================================
  Coverage   72.71%   72.71%           
=======================================
  Files          59       59           
  Lines        4109     4109           
=======================================
  Hits         2988     2988           
  Misses        793      793           
  Partials      328      328
Impacted Files Coverage Δ
cmd/limits.go 82.92% <100%> (ø) :arrow_up:
cmd/ps.go 82.02% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2dddbe1...f82cf83. Read the comment docs.

felixbuenemann commented 7 years ago

Could you possibly fix the regex used here as well?

Fixed in f82cf8373b2742ac4a354220dd25a458c9bf160d.