Skip to content

Commit

Permalink
Fix yaml loading in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsakalozos committed Nov 1, 2021
1 parent 6699a5d commit e372970
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 @@ -58,7 +58,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.load_safe(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.load_safe(output)


def wait_for_pod_state(
Expand Down

0 comments on commit e372970

Please sign in to comment.