-
Notifications
You must be signed in to change notification settings - Fork 24
/
test_kata.py
37 lines (28 loc) · 979 Bytes
/
test_kata.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
Test Kata untrusted container runtimes.
"""
async def test_kata(model, tools):
"""
Deploy Kata, wait for it to
stabelize and then remove.
:param model: Object
:return: None
"""
kata_app = await model.deploy(
"kata", num_units=0, channel=tools.charm_channel
) # Subordinate.
await kata_app.add_relation(
"kata:containerd", "kubernetes-control-plane:container-runtime"
)
await kata_app.add_relation(
"kata:containerd", "kubernetes-worker:container-runtime"
)
await kata_app.add_relation("kata:untrusted", "containerd:untrusted")
await tools.juju_wait()
# To test this further, we'd need to deploy the kata charm
# to an i3.metal instance. These are very expensive, so not
# sure if we want to do that out of the box. If we do decide
# to, just deploy a dummy container as `untrusted` and check it
# finishes.
await kata_app.remove()
await tools.juju_wait()