Add bindings for Container Exec Create + Inspect

Also adds some basic tests for these two. More tests are needed
but will have to wait for state to be finished.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2020-03-23 16:18:17 -04:00
committed by Matthew Heon
parent 0c40b62c77
commit e42cbdd1b2
7 changed files with 160 additions and 4 deletions

View File

@ -21,6 +21,8 @@ import (
var (
// NameRegex is a regular expression to validate container/pod names.
// This must NOT be changed from outside of Libpod. It should be a
// constant, but Go won't let us do that.
NameRegex = regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
// RegexError is thrown in presence of an invalid container/pod name.
RegexError = errors.Wrapf(define.ErrInvalidArg, "names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*")