Debian Codegraph @

debian/missing-sources/github.com/google/cel-go/policy/testdata/required_labels/tests.yaml

raw symbols SCIP
1 # Copyright 2024 Google LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 description: "Required labels conformance tests"
16 section:
17 - name: "valid"
18 tests:
19 - name: "matching"
20 input:
21 spec:
22 value:
23 labels:
24 env: prod
25 experiment: "group b"
26 resource:
27 value:
28 labels:
29 env: prod
30 experiment: "group b"
31 release: "v0.1.0"
32 output:
33 expr: "optional.none()"
34 - name: "missing"
35 tests:
36 - name: "env"
37 input:
38 spec:
39 value:
40 labels:
41 env: prod
42 experiment: "group b"
43 resource:
44 value:
45 labels:
46 experiment: "group b"
47 release: "v0.1.0"
48 output:
49 value: "missing one or more required labels: [\"env\"]"
50 - name: "experiment"
51 input:
52 spec:
53 value:
54 labels:
55 env: prod
56 experiment: "group b"
57 resource:
58 value:
59 labels:
60 env: staging
61 release: "v0.1.0"
62 output:
63 value: "missing one or more required labels: [\"experiment\"]"
64 - name: "invalid"
65 tests:
66 - name: "env"
67 input:
68 spec:
69 value:
70 labels:
71 env: prod
72 experiment: "group b"
73 resource:
74 value:
75 labels:
76 env: staging
77 experiment: "group b"
78 release: "v0.1.0"
79 output:
80 value: "invalid values provided on one or more labels: [\"env\"]"