@@ -45,7 +45,9 @@ describe('StreamsDefinitionValidator', () => {
45
45
'aaa111.121321aaa' ,
46
46
'aaa111.1213_21aaa' ,
47
47
'aaa111.1213-21aaa' ,
48
- 'aaaa.aaaa.aaaa'
48
+ 'aaaa.aaaa.aaaa' ,
49
+ 'metrics.schedule-interval' ,
50
+ 'applicationMetrics.destination'
49
51
] . forEach ( ( mock ) => {
50
52
const control : FormControl = new FormControl ( mock ) ;
51
53
expect ( StreamDeployValidator . key ( control ) ) . toBeNull ( ) ;
@@ -76,7 +78,9 @@ describe('StreamsDefinitionValidator', () => {
76
78
'version.file' ,
77
79
'deployer.*.foo' ,
78
80
'deployer.file.foo' ,
79
- 'spring.cloud.dataflow.skipper.platformName'
81
+ 'spring.cloud.dataflow.skipper.platformName' ,
82
+ 'app.*.spring.cloud.stream.bindings.applicationMetrics.destination' ,
83
+ 'app.*.spring.cloud.stream.metrics.schedule-interval'
80
84
] . forEach ( ( mock ) => {
81
85
const control : FormControl = new FormControl ( mock ) ;
82
86
expect ( StreamDeployValidator . keyProperty ( control ) ) . toBeNull ( ) ;
@@ -108,6 +112,14 @@ describe('StreamsDefinitionValidator', () => {
108
112
result = StreamDeployValidator . validateDeploymentProperties ( formControl ) ;
109
113
expect ( result ) . toBe ( undefined ) ;
110
114
115
+ formControl . setValue ( 'app.*.spring.cloud.stream.bindings.applicationMetrics.destination=metrics' ) ;
116
+ result = StreamDeployValidator . validateDeploymentProperties ( formControl ) ;
117
+ expect ( result ) . toBe ( undefined ) ;
118
+
119
+ formControl . setValue ( 'app.*.spring.cloud.stream.metrics.schedule-interval=PT10S' ) ;
120
+ result = StreamDeployValidator . validateDeploymentProperties ( formControl ) ;
121
+ expect ( result ) . toBe ( undefined ) ;
122
+
111
123
formControl . setValue ( 'baz' ) ;
112
124
result = StreamDeployValidator . validateDeploymentProperties ( formControl ) ;
113
125
expect ( result . validateDeploymentProperties . reason ) . toBe ( 'Invalid deployment property "baz" must contain a single "=".' ) ;
0 commit comments