File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 "the route kind only supports: %s" % ROUTE_PROTOCOL_MATCH .pattern )
4040PROCTYPE_MATCH = re .compile (PROCTYPE_REGEX )
4141PROCTYPE_MISMATCH_MSG = "Process types can only supports: %s" % PROCTYPE_MATCH .pattern
42- MEMLIMIT_MATCH = re .compile (r'^(?P<mem>([1-9][0-9]*[mgMG]))$' , re .IGNORECASE )
43- MEMLIMIT_MISMATCH_MSG = (
44- "Memory limit format: <number><unit>, "
45- "where unit = M or G"
46- )
47- CPUSHARE_MATCH = re .compile (r'^(?P<cpu>([-+]?[1-9][0-9]*[m]?))$' )
48- CPUSHARE_MISMATCH_MSG = "CPU limit format: <value>, where value must be a numeric"
42+
4943TAGVAL_MATCH = re .compile (r'^(?:[a-zA-Z\d][-\.\w]{0,61})?[a-zA-Z\d]$' )
50- CONFIGKEY_MATCH = re .compile (r'^[a-z_]+[a-z0-9_]*$' , re .IGNORECASE )
51- CONFIGKEY_MISMATCH_MSG = (
52- "Config keys must start with a letter or underscore and "
53- "only contain [A-z0-9_]"
54- )
44+ CONFIGKEY_MATCH = re .compile (r'^[A-z0-9_\-\.]+$' , re .IGNORECASE )
45+ CONFIGKEY_MISMATCH_MSG = ("Config key can only supports: %s" % CONFIGKEY_MATCH .pattern )
5546CONFIG_LIMITS_MISMATCH_MSG = "The limit plan {} does not exist"
5647
5748TERMINATION_GRACE_PERIOD_MATCH = re .compile (r'^[0-9]*$' )
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ def test_config_deploy_failure(self, mock_requests):
317317 def test_invalid_config_keys (self , mock_requests ):
318318 """Test that invalid config keys are rejected.
319319 """
320- keys = ("123" , "../../foo" , "FOO/" , "FOO-BAR" )
320+ keys = ("$ 123" , "../../foo" , "FOO/" , "* FOO-BAR" )
321321 app_id = self .create_app ()
322322 url = f'/v2/apps/{ app_id } /config'
323323 for k in keys :
You can’t perform that action at this time.
0 commit comments