Commit Graph

4 Commits

Author SHA1 Message Date
Vincent Demeester 7335544fd0 Revert environment regexp from 13694
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-28 20:26:20 +02:00
Matt Robenolt f1988f046f opts/envfile: trim all leading whitespace in a line
Signed-off-by: Matt Robenolt <matt@ydekproductions.com>
2015-08-22 09:01:27 -07:00
Vincent Demeester dfc6c04fa3 Add test coverage to opts and refactor
- Refactor opts.ValidatePath and add an opts.ValidateDevice
  ValidePath will now accept : containerPath:mode, hostPath:containerPath:mode
  and hostPath:containerPath.
  ValidateDevice will have the same behavior as current.

- Refactor opts.ValidateEnv, opts.ParseEnvFile
  Environment variables will now be validated with the following
  definition :
  > Environment variables set by the user must have a name consisting
  > solely of alphabetics, numerics, and underscores - the first of
  > which must not be numeric.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-12 10:33:30 +02:00
Matthieu Hauglustaine 0dadf11bec Add unit tests for ParseEnvFile.
Add unit tests of the ParseEnvFile function. Test for:
* good file
* empty file
* non existent file
* badly formatted file

Signed-off-by: Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
2015-07-01 17:43:03 +02:00