Make test allowed_pattern type same as the hot example and fix the gate

In murano allowed_pattern set as:
allowed_pattern: [A-Za-z0-9]
But in hot example is set as:
allowed_pattern: '[a-zA-Z0-9]*'

So change the test template allowed_pattern.

Change-Id: I89ac4ef9de5eb0a5176c9df2ce1f289ca0d2cc65
This commit is contained in:
zhurong 2018-03-09 07:06:19 +00:00
parent de53ba8f9a
commit a682d5ee92
4 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ parameters:
description: Range Description
- allowed_values: [0, 1, 2, 3, 4]
description: Allowed Values Description
- allowed_pattern: [A-Za-z0-9]
- allowed_pattern: "[A-Za-z0-9]"
description: Allowed Pattern Description
bar:
type: boolean
@ -51,7 +51,7 @@ parameter_groups:
description: Range Description
- allowed_values: [0, 1, 2, 3, 4]
description: Allowed Values Description
- allowed_pattern: [A-Za-z0-9]
- allowed_pattern: "[A-Za-z0-9]"
description: Allowed Pattern Description
bar:
type: boolean

View File

@ -11,7 +11,7 @@ parameters:
max: 50
- length:
min: 0
- allowed_pattern: [A-Za-z0-9]
- allowed_pattern: "[A-Za-z0-9]"
param3:
type: number
constraints:

View File

@ -16,7 +16,7 @@ parameters:
description: Range Description
- allowed_values: [0, 1, 2, 3, 4]
description: Allowed Values Description
- allowed_pattern: [A-Za-z0-9]
- allowed_pattern: "[A-Za-z0-9]"
description: Allowed Pattern Description
bar:
type: boolean
@ -51,7 +51,7 @@ parameter_groups:
description: Range Description
- allowed_values: [0, 1, 2, 3, 4]
description: Allowed Values Description
- allowed_pattern: [A-Za-z0-9]
- allowed_pattern: "[A-Za-z0-9]"
description: Allowed Pattern Description
bar:
type: boolean

View File

@ -113,7 +113,7 @@ class TestHotPackage(test_base.MuranoTestCase):
self.assertEqual("$.bool().check($ in list(True, False))", param1.expr)
self.assertEqual("$.string().check($ in list('bar'))."
"check(len($) <= 50).check(len($) >= 0)."
"check(matches($, '['A-Za-z0-9']'))", param2.expr)
"check(matches($, '[A-Za-z0-9]'))", param2.expr)
self.assertEqual("$.int().check($ in list(0, 1, 2, 3, 4))"
".check(len($) >= 0 and len($) <= 5)."
"check($ >= 0 and $ <= 4)", param3.expr)