Skip to content

Commit

Permalink
Fix yaml loading in tests (#2698)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsakalozos authored and neoaggelos committed Nov 1, 2021
1 parent eb83acd commit 14ada87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test-addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_invalid_addon(self):
sh.microk8s.enable.foo()

def test_help_text(self):
status = yaml.load(sh.microk8s.status(format='yaml').stdout)
status = yaml.safe_load(sh.microk8s.status(format='yaml').stdout)
expected = {a['name']: 'disabled' for a in status['addons']}
expected['ha-cluster'] = 'enabled'

Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def kubectl_get(target, timeout_insec=300):
"""
cmd = 'get -o yaml ' + target
output = kubectl(cmd, timeout_insec)
return yaml.load(output)
return yaml.safe_load(output)


def wait_for_pod_state(
Expand Down

0 comments on commit 14ada87

Please sign in to comment.