Skip to content

Commit e92962c

Browse files
committed
Add helm unit tests to chart flink-kubernetes-operator
Signed-off-by: Yi Chen <[email protected]>
1 parent d1f28bc commit e92962c

14 files changed

+1086
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
19+
suite: Test Cert Manager Certificate
20+
21+
templates:
22+
- certmanager/certificate.yaml
23+
24+
release:
25+
name: flink-operator
26+
namespace: flink-operator
27+
28+
tests:
29+
- it: Should create certificate
30+
asserts:
31+
- containsDocument:
32+
apiVersion: cert-manager.io/v1
33+
kind: Certificate
34+
name: flink-operator-serving-cert
35+
36+
- it: Should use self signed issuer
37+
asserts:
38+
- equal:
39+
path: spec.issuerRef
40+
value:
41+
group: cert-manager.io
42+
kind: Issuer
43+
name: flink-operator-selfsigned-issuer
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
19+
suite: Test Cert Manager Issuer
20+
21+
templates:
22+
- certmanager/issuer.yaml
23+
24+
release:
25+
name: flink-operator
26+
namespace: flink-operator
27+
28+
tests:
29+
- it: Should create self signed Issuer
30+
asserts:
31+
- containsDocument:
32+
apiVersion: cert-manager.io/v1
33+
kind: Issuer
34+
name: flink-operator-selfsigned-issuer
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
19+
suite: Test ConfigMap
20+
21+
templates:
22+
- controller/configmap.yaml
23+
24+
release:
25+
name: flink-operator
26+
namespace: flink-operator
27+
28+
tests:
29+
- it: Should create a configmap with default configuration if `defaultConfiguration.create` is `true`
30+
set:
31+
defaultConfiguration:
32+
create: true
33+
asserts:
34+
- containsDocument:
35+
apiVersion: v1
36+
kind: ConfigMap
37+
name: flink-operator-config
38+
namespace: flink-operator

0 commit comments

Comments
 (0)