summaryrefslogtreecommitdiff
path: root/tests/unittests
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2022-01-18 20:46:14 -0700
committerGitHub <noreply@github.com>2022-01-18 20:46:14 -0700
commit20bd192db661e519b860a0799de04c663ceae0c6 (patch)
tree1f23a6d2f970a27b10013b7cce0819d5d4157f9b /tests/unittests
parentc2c2a663edccd9fcb74f3bed24a6daad09c45d2a (diff)
downloadvyos-cloud-init-20bd192db661e519b860a0799de04c663ceae0c6.tar.gz
vyos-cloud-init-20bd192db661e519b860a0799de04c663ceae0c6.zip
cmd: status and cloud-id avoid change in behavior for 'not run' (#1197)
snapd currrently looks for 'not run' from cloud-init status[1]. Avoid changing this behavior and revert "not-run" value to "not run". This avoids having to get snapd to change implementation and release updates as far back as Bionic to handle a hyphenated not-run string. [1]: https://github.com/snapcore/snapd/blob/master/sysconfig/\ cloudinit.go#L802
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/cmd/test_status.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/cmd/test_status.py b/tests/unittests/cmd/test_status.py
index 17d27597..c5f424da 100644
--- a/tests/unittests/cmd/test_status.py
+++ b/tests/unittests/cmd/test_status.py
@@ -137,7 +137,7 @@ class TestStatus(CiTestCase):
)
def test_status_returns_not_run(self):
- """When status.json does not exist yet, return 'not-run'."""
+ """When status.json does not exist yet, return 'not run'."""
self.assertFalse(
os.path.exists(self.status_file), "Unexpected status.json found"
)
@@ -154,7 +154,7 @@ class TestStatus(CiTestCase):
cmdargs,
)
self.assertEqual(0, retcode)
- self.assertEqual("status: not-run\n", m_stdout.getvalue())
+ self.assertEqual("status: not run\n", m_stdout.getvalue())
def test_status_returns_disabled_long_on_presence_of_disable_file(self):
"""When cloudinit is disabled, return disabled reason."""