File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def main():
26
26
config .load_kube_config ()
27
27
28
28
with open (path .join (path .dirname (__file__ ), "nginx-deployment.yaml" )) as f :
29
- dep = yaml .load (f )
29
+ dep = yaml .safe_load (f )
30
30
k8s_beta = client .ExtensionsV1beta1Api ()
31
31
resp = k8s_beta .create_namespaced_deployment (
32
32
body = dep , namespace = "default" )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def test_create_deployment(self):
50
50
- containerPort: 80
51
51
'''
52
52
resp = api .create_namespaced_deployment (
53
- body = yaml .load (deployment % name ),
53
+ body = yaml .safe_load (deployment % name ),
54
54
namespace = "default" )
55
55
resp = api .read_namespaced_deployment (name , 'default' )
56
56
self .assertIsNotNone (resp )
<
2907
/main>
You can’t perform that action at this time.
0 commit comments