|
53 | 53 | ),
|
54 | 54 | expected = dict(metadata=dict(annotations=None), data=dict(two=None, three="3"))
|
55 | 55 | ),
|
| 56 | + |
56 | 57 | dict(
|
57 | 58 | last_applied = dict(
|
58 | 59 | kind="Service",
|
|
165 | 166 | expected=dict(spec=dict(containers=[dict(name="busybox", image="busybox",
|
166 | 167 | resources=dict(requests=dict(cpu="50m", memory="50Mi"), limits=dict(cpu=None, memory="50Mi")))]))
|
167 | 168 | ),
|
| 169 | + dict( |
| 170 | + desired = dict(kind='Pod', |
| 171 | + spec=dict(containers=[ |
| 172 | + dict(name='hello', |
| 173 | + volumeMounts=[dict(name="test", mountPath="/test")]) |
| 174 | + ], |
| 175 | + volumes=[ |
| 176 | + dict(name="test", configMap=dict(name="test")), |
| 177 | + ])), |
| 178 | + last_applied = dict(kind='Pod', |
| 179 | + spec=dict(containers=[ |
| 180 | + dict(name='hello', |
| 181 | + volumeMounts=[dict(name="test", mountPath="/test")]) |
| 182 | + ], |
| 183 | + volumes=[ |
| 184 | + dict(name="test", configMap=dict(name="test")), |
| 185 | + ])), |
| 186 | + actual = dict(kind='Pod', |
| 187 | + spec=dict(containers=[ |
| 188 | + dict(name='hello', |
| 189 | + volumeMounts=[dict(name="test", mountPath="/test"), |
| 190 | + dict(mountPath="/var/run/secrets/kubernetes.io/serviceaccount", name="default-token-xyz")]) |
| 191 | + ], |
| 192 | + volumes=[ |
| 193 | + dict(name="test", configMap=dict(name="test")), |
| 194 | + dict(name="default-token-xyz", secret=dict(secretName="default-token-xyz")), |
| 195 | + ])), |
| 196 | + expected = dict(spec=dict(containers=[ |
| 197 | + dict(name='hello', |
| 198 | + volumeMounts=[dict(name="test", mountPath="/test"), |
| 199 | + dict(mountPath="/var/run/secrets/kubernetes.io/serviceaccount", name="default-token-xyz")]) |
| 200 | + ], |
| 201 | + volumes=[ |
| 202 | + dict(name="test", configMap=dict(name="test")), |
| 203 | + dict(name="default-token-xyz", secret=dict(secretName="default-token-xyz")), |
| 204 | + ])), |
| 205 | + ), |
168 | 206 |
|
169 | 207 | # This next one is based on a real world case where definition was mostly
|
170 | 208 | # str type and everything else was mostly unicode type (don't ask me how)
|
|
0 commit comments