Make CIdentifier return error strings

This commit is contained in:
Tim Hockin
2015-12-19 22:52:48 -08:00
parent d07328dc4a
commit 189d4a5159
5 changed files with 18 additions and 11 deletions

View File

@@ -1155,7 +1155,7 @@ func TestValidateEnv(t *testing.T) {
{
name: "name not a C identifier",
envs: []api.EnvVar{{Name: "a.b.c"}},
expectedError: `[0].name: Invalid value: "a.b.c": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName"`,
expectedError: `[0].name: Invalid value: "a.b.c": must match the regex`,
},
{
name: "value and valueFrom specified",